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-block/open-iscsi |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-block/open-iscsi')
29 files changed, 1896 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest new file mode 100644 index 000000000000..39c50fad32c4 --- /dev/null +++ b/sys-block/open-iscsi/Manifest @@ -0,0 +1,33 @@ +AUX 99-iscsi.rules 82 SHA256 c72a201227bb48ef64ebc94828dd63d6f9f4d40f633475f911d5bc9bd59d928b SHA512 1b6c226c836ddfb43c7228984a9062dedbe23ef5f9f97ed37cbb9c28cb9b4b6a7fd4ae2cce169609ee5ed692ad56a675cfe149645a80af7d692d841d6fd12bfd WHIRLPOOL 5ca0b66b16cb65ca63946010ee10703b993a0645cb738101ab7a2cde3970aad9fa94401f512b1130dc22d951cbd445a64fd3dcfb312341e92aa6255c5c3cd559 +AUX initiatorname.iscsi 1152 SHA256 33d11249c769ce816041cecc10048accb660c6c5d493ee9b4dfca370486db593 SHA512 3abd69a3b070695a96e753fb02356a53e1a59f466e7ad87cbb64cfac58761df37e7c950c5c1ac13209e6e64f1a25d88969a4d8a7d698aa32100e9e55495fba5e WHIRLPOOL a15c89c240f83721fb945ebae04ff759f188292ab46b9deb24ab920c69852a7180ed0da488615666b3d2c88ba086d6b1cca2dee9d76130b827f4b23d91d98ab3 +AUX iscsid-conf.d 422 SHA256 3e2a63143e3167f20844ef94f1383180b69c245092583856fd26316674cf4114 SHA512 d197bbe2ce610cc2d4a1269c8d7a067ca5e3b0f3d8bb0804c2c39e0cf512bcbf7b5de45b7d6ffd5cf918dc395c7cf32c40e64b4348d00a4d0223ee44c463709a WHIRLPOOL 19e7dc2d647a271dd67bf2f92e3c866719b1a7c978ecc86395d3586ab0c897e93ab4dce740497a6139f4fae1c5a34c455b806c627c9a9f876133d808890a85bf +AUX iscsid-init.d 2094 SHA256 bc0a8d9d82fae54f20c99402de46d0cfdd2191a1134ce1a0f132016a75090a36 SHA512 a5544e35da3433dfde96984d2e5783991d961554b8843f4f96d4317a38d7534864882342633ed0dc15c2f9e49a419e51958593b0de1ce84644938dafabe392fc WHIRLPOOL 474c975935975b9f31e25a243c33419b26ff64247966c1295bbcf52defb4628986455946f07e20a81ee1c8c9ab5d17769503f1db965efe9b8add5fd2f695c12d +AUX iscsidev.sh 2119 SHA256 1189dc43936fa5e428ad05fe0299d2ffdffe28ccd193396213ac9d59a5c25aaf SHA512 b4ed7fad25e3f000134a77f3aea2702f03ff75e99ecf49e580085127ab58de5a64bea9c4fc2ae5b324deafd0a860494d1a8dc1223db7d3679b960552f0c00813 WHIRLPOOL 28f57226d487fc0843e571c8ceeecf3e2b0eec506efef0b7a54636b1479dfc964d405f2be7f134c0858a24d1d24c67adb6ca9153ed9aaf4955ae403b4500d845 +AUX musl-fixes.patch 1779 SHA256 57d6b4040a9b43c8a8864fb3e1c25ac48b78427265f4487744685a9a2b1b2954 SHA512 e45ce5deec9d3861568e0be3390827da525b523b6d0a47a99f85becb4416e3a26f5e17f077a891c43ae90e621fa8d357123b9b3573a731788fac2c12b40239a6 WHIRLPOOL cd04a713f24f6cb7e3e6753d8e611cb1ab440137c4b78cf3670bc34e2cc95f04ab1bf334aaceef610d294133e4fd1e9534a433c5525223528a59ae7df94d46d2 +AUX open-iscsi-2.0.872-conf.d 422 SHA256 3e2a63143e3167f20844ef94f1383180b69c245092583856fd26316674cf4114 SHA512 d197bbe2ce610cc2d4a1269c8d7a067ca5e3b0f3d8bb0804c2c39e0cf512bcbf7b5de45b7d6ffd5cf918dc395c7cf32c40e64b4348d00a4d0223ee44c463709a WHIRLPOOL 19e7dc2d647a271dd67bf2f92e3c866719b1a7c978ecc86395d3586ab0c897e93ab4dce740497a6139f4fae1c5a34c455b806c627c9a9f876133d808890a85bf +AUX open-iscsi-2.0.872-dont-call-configure.patch 296 SHA256 92ab247afde924a6d07643abc2cb34598a2fb13f62718684803ab44b9bce7241 SHA512 513e775695288b747b40cfb9815c9083b61637f0e3ba241f5d5f3363730059ac4a01e55c23ab3ff983da7d3a5b40448447740ac35e0748c4d5e8942946146522 WHIRLPOOL af5c1cae289cf669dcd9cc6ce02e6a7e6603dceb8f3827d79f4d7adeb35aa9c9c6e588e1e915c078c31532a9985f4fb2a74fe7270269c686be4d7f6c2083ae06 +AUX open-iscsi-2.0.872-glibc212.patch 266 SHA256 e7b299da12daed432f18a115b7a14eadb61a3db13df89af21a9078357ebf63ca SHA512 8d869642b27dc7d243cf5697858a19127e5e627dd62fd2a8879e4baf84f87aa07e7682faa5f7153ef75e8f9a78ae9b1a84e3260f449fbbb26d848064ec736630 WHIRLPOOL c501c6d8ae334974635f25060b29e326da7a6ef33062c518cd115fa7cae6a63ef3901dc7e1c421a70557b114cead6cc951a09712cf19c83c7f79ec96635fe7e4 +AUX open-iscsi-2.0.872-init.d-r1 2841 SHA256 1f8df4e9503844c2ae63f2bf10efb05774f8e6c5733bbfa6c63b592ac3107698 SHA512 dd3ab871df500eea84768913a40ac00d25695f9388d7cbd6f8cf4c301ce5da7492a4ce4b55b20e71b3e84e9a1f86f0be7108d4fc5eddff6f3121f1d990d786fa WHIRLPOOL 89a317193dc8ddaddf5b7dd04532ed6ebd2e557cbc4dcf4e1d28a8f7845776d6500feb94a01e440d165ec22914a225d4a7b9a972876530b1d7dee43567ccd9d0 +AUX open-iscsi-2.0.872-isns-slp.patch 871 SHA256 d83640c9a7f9d7fed2b502d0164f6f8a91adb87f45e79a793954eae536a22138 SHA512 8aa4e6897c3284b7d914b7805d37a5d21014d66514675a4878c05535c460fc5ffafb43628f4112226f116fb8d941f14fc66246f0d395f0e44c90610494546f73 WHIRLPOOL f98cb605e1311792c6c9e5e03d2508cc05a10a94fc36feeb70c0b558f65861f743bdb1896da971dc93bac67638f69b8ac4a27ff7bfc9ef3c9c735c1f4ded81af +AUX open-iscsi-2.0.872-ldflags.patch 309 SHA256 b8544087dfbc579209d326f825a251f6fc10898ca29ce46264d4a86ceac95941 SHA512 4204a615e10d52130a2fb39b81d99df45350b7f7431fa4e110e535ece2c1aab2cda0b8e787561a051c232a80f2cd99af007e94c1ca122727aac7854eee478219 WHIRLPOOL c8a6a6fad91680df09227a5ae29b2a9f7c172c0a9326e3d53ec5c16ae63fe733ab392949e777c5ca3a3c01d6a07d925f22a2dc82bbb53c3b76a7ed7b7e5010fd +AUX open-iscsi-2.0.872-makefile-cleanup-pass2.patch 2134 SHA256 8725f8aba89f86c275f9a53bfb066d392b43e6ba5496c09bc2d9543453f45122 SHA512 ee1700c010578160f2fe3bb2f5a7eca4bde900faa138445eaf6b1875a7ad89d5c13b530d25a0ac5844213fa118b4e5253180414956d4e514dae0ede936dee2c8 WHIRLPOOL ef5377ca5d95e7ce12727dca3a3547e59b37c21772799e24be0cf6725e432502bcfd7156990be98405f0382793247d3edc3cba6e85fc45261ddaa2a797180679 +AUX open-iscsi-2.0.872-makefile-cleanup.patch 839 SHA256 c0e92ba2211dd74e89dcc0c5793e02ad8ad06b41a07a0687007bba6415546dfd SHA512 bc4cae49f435a4396a88b5d238c1f72a808c5d272042ee1acfe6c27d96613b9fc03ba2ce7e40d0a0f4aef2a924a66b45fb8a1e6db131415668c5336c5a4cf720 WHIRLPOOL 4045bf2826a33460f00218a65dc1e1614aac1bf16a07f4752546df4066c9e4c0420d5fa5b235b634a4bfd1c5626ab1813b6f595ab2b71743755ac378b41e8138 +AUX open-iscsi-2.0.873-Makefiles.patch 5441 SHA256 8b12789550bef694d49a4bf89752c5bd3e60ca9c7ce63d6268f49bf672af317f SHA512 8dd3433db748f2fd0da0ab6a1059d7058eb09c527e9d039e768bc359a6b665da3e5c13463c32f35d7c630a3b901a689315ece3adb88cccabe452352658705f33 WHIRLPOOL 2115505cc80080454f810f973dd2b80ee6dd6567e2e3a9e2d1d3b4457e2bd3254958d6cdeae7bbce3e3f38c86a577d2900f11e5321b21b264658f38b171ebb8e +AUX open-iscsi-2.0.873-memset.patch 680 SHA256 16c888ba513b972998ea1dc7f362c1290e1a61376c8e9337b9c9bc5ffd63d048 SHA512 1fb0615d443ce913409f5e6e3cc217149c2586cf1b4175d34512337929c1e2209391808e8f2192742d2f3bfb382e21eaa90e596b6c3e3383ee1a5b735a30fd9b WHIRLPOOL 3c5864f2813249f83ecc0bcc6bac37776b61892a88d516790d53782c57e6903479ecde599935e3a127ebe47f3f6b0fe3d1149eaac28a40d4c2cbfbc135f00853 +AUX open-iscsi-2.0.874-Makefiles.patch 4087 SHA256 1f2754442ee9f222659fdb7208c855d48f5f34f58e54bcf69c86f0571d46e6b8 SHA512 c535a45c627aaa8fd168d4c96f782090b9ae829003ec59c6ead7f34d15f4e52c71916aa014209ac35fd3b29296bb46b603d8df2072be463c5fcc90338784665c WHIRLPOOL 59bf590eb35af823c95679dec6447f5ed9e220551e8ce3e97e5c7341b3847e9195221bfb25e74fd9f95e50ce6eb43b67550e03d63466f9fbc6c0fcbb8dd9885d +AUX open-iscsi-2.0.874-musl-ethtool-compat.patch 2230 SHA256 dcac09fde32057dcc0e1e4fec17e442d2206fcddb6d8ef795ef2b30394033712 SHA512 09a3b828773e0d7c5d98f8ba8c0683bd1ef5fd83860fafaa75d89cce9e09cebc68bfaea62091aeadeb1d1adfe5318c0af9bfa0a74f2d802568abe1a59b4ebf03 WHIRLPOOL 1d431a8cc816ace3d5454b53486cdecc9230a91b32e0987d3aeb242cb1014ecc3f8ea755b55c6229a58abd5e5bd09ecbcd59f20db2bfabde89967344cc95be7f +AUX open-iscsi-2.0.874-musl-fixes.patch 1478 SHA256 64a99846d44e1cbb40930bb409615573d53d060abfb5655299924adb5d53a1e6 SHA512 264313bc8de01bcad1db858c0b99ca2c294c22eb1b2693e0445083a895afd0cdc9178ff2dad5de18628a6e61723ad5d2e0c0d4789ce07ccae131f575747aa382 WHIRLPOOL cb603595aec0ba37fd5d489520a89ff7d6f65f3e94f4c8344a8a59eacbf6060c8eac68bbc14dbe531bbec8e0d9bc8094085f0e61edee6fb40a65093e9508bb5f +DIST open-iscsi-2.0-872.tar.gz 900081 SHA256 37753697a170223ac02a292b3a23a315a3c747b490c42480e4057b676c9f8d4f SHA512 d26c87772b0b1d13a8bd2eea9db86b3c61af83efbb788116c01ab6a914ff3de634a7b1bff56c1161b28965315543edbfc2735b6c7fbd3f7797471fde63b69cc0 WHIRLPOOL 4b04c8481c6c5f094ca6f7761828006a84eda7a22a6b3a4d65e7b3e4b39e73ef839ec710b491e7ca731b047fa8c74a9c03a17e85519a62dfbeb95222cfbdd935 +DIST open-iscsi-2.0-873.tar.gz 667069 SHA256 7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9 SHA512 4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b WHIRLPOOL 05af106f11da9f9f02c10edd5412d0f99816349e06e192059700eb1ae24a36027c3f0d7ed423aa7bb1c0b9d8b3aa1b6aa72a2aadb00f27762edf16b7f7d08c09 +DIST open-iscsi-2.0.874.tar.gz 625039 SHA256 d0071bf00fdf6591cd6ea5caf89fa57ada03d263da1f80f17deff76acf7419e1 SHA512 66d8a52b6401229d51873f1ee0f4e7259a8ed584800403a41741c7eeedc0ec21a2b116671cb7259f60918d083ffb46d76860236a1b10fbb94a4c1d61bddae1ae WHIRLPOOL 488aea5551a299bbb15118efc52d7c228836e9cc7973a99ee4b8dfcfea4b7b14e86791e65230d25c244b6b5fe8ffaf1ae3df01f5a7b223b93c15aeb035a12852 +EBUILD open-iscsi-2.0.872-r2.ebuild 3007 SHA256 d7ed50615b36c9aa3d6c6b4ca5ca8ed0310da9a03ee903a946ea823e7f86fc60 SHA512 d3b56940d8ac3cb2697a934b544302bb0e93cfead3aa69df173a0643fbc121e3c5316e27f6ae8935f6a1730ed687011eda7d8915ef3395d2c56691145f370c62 WHIRLPOOL f7a505e9fbadf02e3d9a80185d428a506ed7ae305ca53f76b9afeec48675d749e827cd406b0bc415531df1ed9bf360976238e563fade3a96e32a80287773cf63 +EBUILD open-iscsi-2.0.872-r3.ebuild 3183 SHA256 7c73d5cdf83dcc157bc1b7e92938ec17aed94e93c4bb933d17feb7f55b80210e SHA512 080d46776411e08a3a2eb8317f5354ba93af5b13e879e541257395c961abce591d5424e97fe44f0c2efa7c930e9aee31a7a79cd940170272a0b37345831f1ac4 WHIRLPOOL 9fb1e8f6d98f9278f6a2ac358221107cad8e5dd1477aeb93b408c2a726e55ede9e14bc0fab974f0e47e169749338ae4c873b90e198077cc04f36321ccd1223cd +EBUILD open-iscsi-2.0.873-r1.ebuild 2565 SHA256 cad2029ea9029bc3403c5eeacfcdf357d22384841e3b0d6fcc566e15d178f2ba SHA512 ee202d73255f732248336eec427a0102b857267222d3eaf7b0545f93be2ce15b63b3bbd57fae7ed83050581ce6ac2cac9d16cfbe5a989d1a18812d104dc7133b WHIRLPOOL fae39ea33d60640e8863cff77d58b4cd89147fef886ff4bbedc3b6afe942a5072b9c6f35c64b747cd99232d52260fcb8d468ccec968deb9163f3d324bd5d6bb4 +EBUILD open-iscsi-2.0.873-r2.ebuild 3271 SHA256 3e495db167d318949c9ef94436ef4e2e0888f5deee949ffec2dc46a66d220645 SHA512 ae7db0924daaf6013d9745222fbc308815dbf6f06978310fa7f9a6eed203cc612e7ee0bb5bc5b642cb5b138fe281e711836dcf8e7bff13d3a068d93f3ce4c2ad WHIRLPOOL 43f17a619b8ad56d957b50130eb6bf803d6df32150caf0c570912550a689630475c9bb1a7eeb97fb3aa084f60d57fa822ad85840886b970787c2a6bf63792c53 +EBUILD open-iscsi-2.0.873-r3.ebuild 3324 SHA256 a47316cc329660e971c7a9f69f78620331c5f85a5f99491a9cefb9bfe10385a1 SHA512 f3154556865d0611bf7452f1d2f359a4edcb717dde5d60898d1f0b58be7901b77b240bb931c87a56c93257410a9bf5dbe81e2aef1e75eb73f5212ddd7da4e1b7 WHIRLPOOL 329554f1add082e117048f160fbc28af38660190ff8f9cb2b656e23424dab471781a89f5245cda40070b17baa3c3663249069385088c64f4b00ce354707381f1 +EBUILD open-iscsi-2.0.873.ebuild 2367 SHA256 b2efc1243850a5ff769512146ef0d85ddbe00f29e6059e9b03cb21ea1e1c1da0 SHA512 e70c63d139fd7d2e904152b89b1353d8c7e66abfae4caacc326ffc4ad226c5319ecdd175b2854022062d2f4e011ca4011c7c0343cd85a2dfd4e4d0a175756d02 WHIRLPOOL 884342900b93a09dc6d136876a6d20ad728e1d4620a6a5bb9a472ef13b0a80f1694607517a55dbdde38c3b4757e071bf1b10f6598b89ca6f557c9d178caa76ce +EBUILD open-iscsi-2.0.874-r1.ebuild 3629 SHA256 f9ec60a81e8b418bb56cf7324b60c6c69794c46955f11300217761f5efc85d3a SHA512 f9dbe5b16a4580351f424c98dafde5e83e99bda84d2d389b96b34f772a757097195adb183df2030a8b15da752ac449c2588fbb11a4fb9cfb7095a4fa31b7ab00 WHIRLPOOL ff9319571861936d3a4c3a420a080fdecaea8941055426d74d97bb46c72c35db4cdfb01112aedb14c6261499f9c8dc305007a62e876e861af764c13bcbf96923 +EBUILD open-iscsi-2.0.874.ebuild 3164 SHA256 6398b4ad27cea2f56f20c43b2cb20178921e6c6bdd78f9269865d274c5a53afb SHA512 19219e336d2e289dfa0d2b1e28d8b7d1274f734fd6cd55be1512254412a2688122fc1fe6137d4050cb62160981a358366184c668369212103d28fcdaa1305278 WHIRLPOOL 9be926740203797b04d9c88b2b47218af453ade94c2ee215e3e665e0f0a886a1a33c49d55f8d263cae3f92a7ddd42d5ef8cf6ea3e3822ef60e6e2f467773de74 +MISC ChangeLog 7059 SHA256 167bdede9a6ca06849e6bfce2dae6afb69e127073c0fd2ebc29b4c7f690e9395 SHA512 703d7be9fc42ee2f2b518900b0eec5a38d0d49372eb3b17d0c794dc5357b638f5404faa473710efc8d72c6371105606149248c12199e7ba2682a3119babe9f23 WHIRLPOOL 3564d5b95d5fbb444d3f17f61d658fb97628782b841010f6e548307351f00beb00904fc70b4c57a138e5aabba4869a7ff6b6c1c9535e4b74d72fef65b24436c5 +MISC ChangeLog-2015 12774 SHA256 9b9181930bb9ff4372f3be4dba556ea5bd21a5ac8b0c7477f04bc487013005a2 SHA512 68fe6c69d7a6bb1ae5f130ce454428d9eef12985e9a9a92bb8231eb667dbf2b0da9dd32aa949cdaeaa1aa5c8f8eea498c47f101206b383e141f97dc7d14fd6f6 WHIRLPOOL 74d28df5ad38713c3f3b1e2dd50d95175d5580a4c95703bc4c904069a895c1c3d62f7045b4c6e3e73fea08549bc0be1b54a34a9e412705e4c0dace8bce2f31e6 +MISC metadata.xml 458 SHA256 7c46709fa7fca8035e11ca9569cf9e0fb86cb98b837f5361f5a4b81f5f6f8c29 SHA512 bd5e104acd3e07b8965b4eacb7b397b75448fc31b7359f17ee4e24af18fcd00ecd0c64001d42b7a542790151678b9dd02bad9513a69986c60cf91cceebfe86c3 WHIRLPOOL 8e19b586084b3709aa8a4d1e79e0e279b5ebf3762ba20252a6e00779b3ced0e2be35ee01197b6c8eeadef595ca4f4f1dac485111601ccd36f710ad397ef8864f diff --git a/sys-block/open-iscsi/files/99-iscsi.rules b/sys-block/open-iscsi/files/99-iscsi.rules new file mode 100644 index 000000000000..3816126264c7 --- /dev/null +++ b/sys-block/open-iscsi/files/99-iscsi.rules @@ -0,0 +1 @@ +KERNEL=="sd*", SUBSYSTEMS=="block", RUN{program}+="/etc/udev/scripts/iscsidev.sh" diff --git a/sys-block/open-iscsi/files/initiatorname.iscsi b/sys-block/open-iscsi/files/initiatorname.iscsi new file mode 100644 index 000000000000..22179903c543 --- /dev/null +++ b/sys-block/open-iscsi/files/initiatorname.iscsi @@ -0,0 +1,30 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# +# This file must contain a InitiatorName entry! +# white space is significent here! +#InitiatorName=iqn.2005-09.tld.domain.hostname:openiscsi-initiator +#InitiatorAlias=foobar + +# Sample documentation follows: + +# The InitiatorName should take the following format +# iqn.${YEAR}-${MONTH}-${DOMAIN_REVERSED}.${HOSTNAME}:${UNIQUE_STRING} +# Where YEAR and MONTH are the dates that your domain was registered. +# You can use WHOIS to find when your domain was registered. +# If you don't have a real domain in the outside world, invent one, but use +# .local for your top-level. + +# Example case #1: +# This assumes you own foobar.co.uk. +# Domain name: foobar.co.uk. +# Registration date: March 2001 +# Hostname: linux +# InitiatorName=iqn.2001-03.uk.co.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216 + +# Example case #2: +# This assumes you don't have a domain of your own. +# Domain name: foobar.local +# Registration date: March 2001 +# Hostname: linux +# InitiatorName=iqn.2001-03.local.foobar.linux:openiscsi-29b48ad602d5f83dd9cd9aa3ef741216 diff --git a/sys-block/open-iscsi/files/iscsid-conf.d b/sys-block/open-iscsi/files/iscsid-conf.d new file mode 100644 index 000000000000..02e584fbce52 --- /dev/null +++ b/sys-block/open-iscsi/files/iscsid-conf.d @@ -0,0 +1,18 @@ +# /etc/conf.d/iscsid + +# config file to use +CONFIG_FILE=/etc/iscsi/iscsid.conf + +# you need to specify an initiatorname in the file +INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi + +# options to pass to iscsid +OPTS="-i ${INITIATORNAME_FILE}" + +# Start automatic targets when iscsid is started +AUTOSTARTTARGETS="yes" + +# if set to "strict", iscsid will stop, if connecting the +# autostart targets failed +# AUTOSTART="strict" + diff --git a/sys-block/open-iscsi/files/iscsid-init.d b/sys-block/open-iscsi/files/iscsid-init.d new file mode 100644 index 000000000000..617af9ac1097 --- /dev/null +++ b/sys-block/open-iscsi/files/iscsid-init.d @@ -0,0 +1,106 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +command="/usr/sbin/iscsid" +command_args="${OPTS}" +start_stop_daemon_args="-w 100" # iscsid might fail e.g. when the iSCSI kernel modules aren't available +pidfile=${PIDFILE:-/var/run/${SVCNAME}.pid} + +extra_started_commands="starttargets stoptargets" +extra_commands="restarttargets" + +ISCSIADM=/usr/sbin/iscsiadm + +depend() { + after modules multipath + use net +} + +checkconfig() { + if [ ! -e /etc/conf.d/${SVCNAME} ]; then + eerror "Config file /etc/conf.d/${SVCNAME} does not exist!" + return 1 + fi + if [ ! -e "${CONFIG_FILE}" ]; then + eerror "Config file ${CONFIG_FILE} does not exist!" + return 1 + fi + + if [ -e ${INITIATORNAME_FILE} ]; then + . ${INITIATORNAME_FILE} + fi + if [ ! -e ${INITIATORNAME_FILE} -o -z "${InitiatorName}" ]; then + ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name." + local IQN=$(/usr/sbin/iscsi-iname) + ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}" + echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}" + eend $? + fi +} + +starttargets() { + ebegin "Setting up iSCSI targets" + $ISCSIADM -m node --loginall=automatic + local ret=$? + eend $ret + return $ret +} + +stoptargets() { + ebegin "Disconnecting iSCSI targets" + sync + $ISCSIADM -m node --logoutall=all + local ret=$? + + if [ $ret -eq 21 ]; then + # See man iscsiadm(8) + einfo "No active sessions to disconnect" + eend 0 + return 0 + fi + + eend $ret + return $ret +} + +restarttargets() { + stoptargets + starttargets +} + +status() { + ebegin "Showing current active iSCSI sessions" + $ISCSIADM -m session +} + + +start_pre() { + local ret=1 + + ebegin "Checking Open-iSCSI configuration" + checkconfig + ret=$? + if [ $ret -ne 0 ]; then + eend 1 + return 1 + fi + eend 0 +} + +start_post() { + # Start automatic targets when iscsid is started + if [ "${AUTOSTARTTARGETS}" = "yes" ]; then + starttargets + local ret=$? + if [ "${AUTOSTART}" = "strict" -a $ret -ne 0 ]; then + stop + return $ret + fi + fi + return 0 +} + +stop_pre() { + stoptargets +} diff --git a/sys-block/open-iscsi/files/iscsidev.sh b/sys-block/open-iscsi/files/iscsidev.sh new file mode 100644 index 000000000000..d045fae570fc --- /dev/null +++ b/sys-block/open-iscsi/files/iscsidev.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# KERNEL=="sd*", SUBSYSTEMS=="block", RUN{program}="/etc/udev/scripts/iscsidev.sh" + +# we only care about iscsi devices +[[ $ID_VENDOR = "IET" ]] || exit 1 + +# don't care about partitions either +echo $DEVNAME | egrep -q "[0-9]$" +status=$? +[[ $status != 0 ]] || exit 1 + +#ID_MODEL=VIRTUAL-DISK +#ID_MODEL_ENC=VIRTUAL-DISK +#ID_REVISION=0001 +#DEVTYPE=disk +#ID_BUS=scsi +#SUBSYSTEM=block +#ID_SERIAL=1IET_00010001 +#DEVPATH=/devices/platform/host74/session68/target74:0:0/74:0:0:1/block/sde +#ID_VENDOR_ENC=IET\x20\x20\x20\x20\x20 +#MINOR=64 +#ID_SCSI=1 +#ACTION=add +#PWD=/ +#ID_PART_TABLE_UUID=54f71c65-a5d5-45cd-8915-5ffd5ff4fea6 +#ID_FS_TYPE= +#USEC_INITIALIZED=999037905 +#MAJOR=8 +#ID_SCSI_SERIAL=beaf11 +#DEVLINKS=/dev/disk/by-id/scsi-1IET_00010001 +#DEVNAME=/dev/sde +#SHLVL=1 +#ID_TYPE=disk +#ID_PART_TABLE_TYPE=gpt +#ID_VENDOR=IET +#ID_SERIAL_SHORT=IET_00010001 +#SEQNUM=25775 + +# do the removal +if [[ $ACTION = 'remove' ]]; then + # nohup needed so this isn't constantly run... + nohup find -L /dev/disk/by-path/ -type l -lname ${DEVNAME} -exec rm "{}" + 2>/dev/null & + exit 0 +fi + +TARGET_NAME=$(lsscsi -t | grep "${DEVNAME}" | awk '{print $3}' | awk -F, '{print $1}') +[[ $TARGET_NAME = '' ]] && exit 1 + +# we don't know which host is correct +declare -a POSSIBLE_HOSTS +declare -a POSSIBLE_PORTS +for item in $(cat /sys/class/iscsi_connection/connection*/address); do + POSSIBLE_HOSTS+=("${item}") +done +for item in $(cat /sys/class/iscsi_connection/connection*/port); do + POSSIBLE_PORTS+=("${item}") +done + +#get correct ip and port +for ((i=0;i<${#POSSIBLE_HOSTS[@]};++i)); do + printf "%s is in %s\n" "$POSSIBLE_HOSTS[i]}" "${POSSIBLE_PORTS[i]}" + iscsiadm --mode node --targetname "${TARGET_NAME}" -p "${POSSIBLE_HOSTS[i]}":"${POSSIBLE_PORTS[i]}" + status=$? + if [[ $status = 0 ]]; then + TARGET_IP="${POSSIBLE_HOSTS[i]}" + TARGET_PORT="${POSSIBLE_PORTS[i]}" + break + fi +done + +# exit if not found +[[ -z $TARGET_IP ]] && exit 1 +[[ -z $TARGET_PORT ]] && exit 1 + +# actually create the link +mkdir -p /dev/disk/by-path/ +ln -s "${DEVNAME}" "/dev/disk/by-path/ip-${TARGET_IP}:${TARGET_PORT}-iscsi-${TARGET_NAME}-lun-1" diff --git a/sys-block/open-iscsi/files/musl-fixes.patch b/sys-block/open-iscsi/files/musl-fixes.patch new file mode 100644 index 000000000000..f101eda6ddeb --- /dev/null +++ b/sys-block/open-iscsi/files/musl-fixes.patch @@ -0,0 +1,64 @@ +--- ./utils/open-isns/isns.h.orig ++++ ./utils/open-isns/isns.h +@@ -13,6 +13,7 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <stdio.h> ++#include <time.h> + + #include <isns-proto.h> + #include "types.h" +--- ./utils/fwparam_ibft/fwparam_ppc.c.orig ++++ ./utils/fwparam_ibft/fwparam_ppc.c +@@ -356,7 +356,7 @@ + * Sort the nics into "natural" order. The proc fs + * device-tree has them in somewhat random, or reversed order. + */ +- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp); ++ qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp); + + snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases"); + dev_count = 0; +--- ./usr/idbm.c.orig ++++ ./usr/idbm.c +@@ -25,6 +25,7 @@ + #include <stdlib.h> + #include <string.h> + #include <errno.h> ++#include <fcntl.h> + #include <dirent.h> + #include <limits.h> + #include <sys/stat.h> +--- ./usr/iscsiadm.c.orig 2012-05-21 02:59:24.000000000 +0200 ++++ ./usr/iscsiadm.c 2016-07-20 22:00:54.430451701 +0200 +@@ -2403,6 +2403,7 @@ main(int argc, char **argv) + int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0; + int packet_size=32, ping_count=1, ping_interval=0; + int do_discover = 0, sub_mode = -1; ++ int argerror = 0; + struct sigaction sa_old; + struct sigaction sa_new; + struct list_head ifaces; +@@ -2553,7 +2554,11 @@ main(int argc, char **argv) + return 0; + case 'h': + usage(0); +- } ++ ++ case '?': ++ log_error("unrecognized character '%c'", optopt); ++ argerror = 1; ++ } + + if (name && value) { + param = idbm_alloc_user_param(name, value); +@@ -2568,8 +2573,7 @@ main(int argc, char **argv) + } + } + +- if (optopt) { +- log_error("unrecognized character '%c'", optopt); ++ if (argerror) { + rc = ISCSI_ERR_INVAL; + goto free_ifaces; + diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d b/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d new file mode 100644 index 000000000000..02e584fbce52 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-conf.d @@ -0,0 +1,18 @@ +# /etc/conf.d/iscsid + +# config file to use +CONFIG_FILE=/etc/iscsi/iscsid.conf + +# you need to specify an initiatorname in the file +INITIATORNAME_FILE=/etc/iscsi/initiatorname.iscsi + +# options to pass to iscsid +OPTS="-i ${INITIATORNAME_FILE}" + +# Start automatic targets when iscsid is started +AUTOSTARTTARGETS="yes" + +# if set to "strict", iscsid will stop, if connecting the +# autostart targets failed +# AUTOSTART="strict" + diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch new file mode 100644 index 000000000000..185f1acd8373 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-dont-call-configure.patch @@ -0,0 +1,11 @@ +--- open-iscsi-2.0-872.orig/Makefile ++++ open-iscsi-2.0-872/Makefile +@@ -27,7 +27,7 @@ IFACEFILES = etc/iface.example + all: user kernel + + user: ; +- cd utils/open-isns; ./configure; $(MAKE) ++ cd utils/open-isns; $(MAKE) + $(MAKE) -C utils/sysdeps + $(MAKE) -C utils/fwparam_ibft + $(MAKE) -C usr diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch new file mode 100644 index 000000000000..61717032940a --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-glibc212.patch @@ -0,0 +1,10 @@ +--- usr/iscsid.c 2010-10-10 23:06:37.000000000 +0200 ++++ usr/iscsid.c 2010-10-10 23:07:55.000000000 +0200 +@@ -31,6 +31,7 @@ + #include <sys/utsname.h> + #include <sys/types.h> + #include <sys/wait.h> ++#include <sys/stat.h> + + #include "iscsid.h" + #include "mgmt_ipc.h" diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1 b/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1 new file mode 100644 index 000000000000..597d0804feb3 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-init.d-r1 @@ -0,0 +1,130 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +opts="${opts} starttargets stoptargets restarttargets" + +depend() { + after modules + use net +} + +PIDFILE=${PIDFILE:-/var/run/${SVCNAME}.pid} +BINARY="/usr/sbin/iscsid" + +checkconfig() { + if [ ! -e /etc/conf.d/${SVCNAME} ]; then + eerror "Config file /etc/conf.d/${SVCNAME} does not exist!" + return 1 + fi + if [ ! -e "${CONFIG_FILE}" ]; then + eerror "Config file ${CONFIG_FILE} does not exist!" + return 1 + fi + if [ ! -e ${INITIATORNAME_FILE} ] || [ ! "$(grep "^InitiatorName=iqn\." ${INITIATORNAME_FILE})" ]; then + ewarn "${INITIATORNAME_FILE} should contain a string with your initiatior name." + IQN=iqn.$(date +%Y-%m).$(hostname -f | awk 'BEGIN { FS=".";}{x=NF; while (x>0) {printf $x ;x--; if (x>0) printf ".";} print ""}'):openiscsi + IQN=${IQN}-$(echo ${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM} | md5sum | sed -e "s/\(.*\) -/\1/g" -e 's/ //g') + ebegin "Creating InitiatorName ${IQN} in ${INITIATORNAME_FILE}" + echo "InitiatorName=${IQN}" >> "${INITIATORNAME_FILE}" + eend $? + fi +} + +do_modules() { + msg="$1" + shift + modules="${1}" + shift + modopts="$@" + for m in ${modules} + do + if modprobe --show --quiet "${m}" + then + ebegin "${msg} ${m}" + modprobe ${modopts} ${m} + ret=$? + eend ${ret} + if [ ${ret} -ne 0 ]; then + return ${ret} + fi + else + ebegin "${msg} ${m}: not found" + return 1 + fi + done + return 0 +} + +start() { + ebegin "Checking open-iSCSI configuration" + checkconfig + ret=$? + if [ $ret -ne 0 ]; then + eend 1 + return 1 + fi + ebegin "Loading iSCSI modules" + do_modules 'Loading' 'libiscsi scsi_transport_iscsi iscsi_tcp' + ret=$? + if [ $ret -ne 0 ]; then + eend 1 + return 1 + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet --exec ${BINARY} -- ${OPTS} + ret=$? + if [ $ret -ne 0 ]; then + eend $? + return $? + fi + + # Start automatic targets when iscsid is started + if [ "${AUTOSTARTTARGETS}" = "yes" ]; then + starttargets + ret=$? + if [ "${AUTOSTART}" = "strict" ] && [ $ret -ne 0 ]; then + stop + return $ret + fi + fi + return 0 +} + +stop() { + stoptargets + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --exec ${BINARY} --pidfile ${PIDFILE} + eend $? + + do_modules 'Removing iSCSI modules' 'iscsi_tcp scsi_transport_iscsi libiscsi' '-r' + eend $? +} + +starttargets() { + ebegin "Setting up iSCSI targets" + /usr/sbin/iscsiadm -m node --loginall=automatic + ret=$? + eend $ret + return $ret +} + +stoptargets() { + ebegin "Disconnecting iSCSI targets" + sync + /usr/sbin/iscsiadm -m node --logoutall=all + ret=$? + eend $ret + return $ret +} + +restarttargets() { + stoptargets + starttargets +} + +status() { + ebegin "Showing current active iSCSI sessions" + /usr/sbin/iscsiadm -m session +} diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch new file mode 100644 index 000000000000..db280a3dd862 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-isns-slp.patch @@ -0,0 +1,16 @@ +diff -Nuar open-iscsi-2.0-872.orig/usr/Makefile open-iscsi-2.0-872/usr/Makefile +--- open-iscsi-2.0-872.orig/usr/Makefile 2012-02-09 08:25:13.656604152 +0000 ++++ open-iscsi-2.0-872/usr/Makefile 2012-02-09 08:26:28.960171260 +0000 +@@ -53,10 +53,10 @@ + + iscsid: $(ISCSI_LIB_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \ + iscsid.o session_mgmt.o discoveryd.o +- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns $(SLP_LIBS) -lcrypto + + iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o +- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns $(SLP_LIBS) -lcrypto + + iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ + iscsistart.o statics.o diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch new file mode 100644 index 000000000000..fc02cbcc1ec4 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-ldflags.patch @@ -0,0 +1,11 @@ +--- utils/Makefile 2011-05-31 01:30:27.302609540 +0200 ++++ utils/Makefile 2011-05-31 01:32:50.229602790 +0200 +@@ -6,7 +6,7 @@ + all: $(PROGRAMS) + + iscsi-iname: md5.o iscsi-iname.o +- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ + + clean: + rm -f *.o $(PROGRAMS) .depend diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch new file mode 100644 index 000000000000..fb563d10e1bc --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup-pass2.patch @@ -0,0 +1,55 @@ +diff -NuarwbB open-iscsi-2.0-872/usr/Makefile open-iscsi-2.0-872.orig/usr/Makefile +--- open-iscsi-2.0-872.orig/usr/Makefile 2012-02-09 08:58:04.402623915 +0000 ++++ open-iscsi-2.0-872/usr/Makefile 2012-02-09 08:56:51.159070006 +0000 +@@ -65,6 +65,6 @@ + rm -f *.o $(PROGRAMS) .depend $(LIBSYS) + + depend: ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend +- gcc $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -NuarwbB open-iscsi-2.0-872/utils/fwparam_ibft/Makefile open-iscsi-2.0-872.orig/utils/fwparam_ibft/Makefile +--- open-iscsi-2.0-872.orig/utils/fwparam_ibft/Makefile 2012-02-09 08:57:58.579273051 +0000 ++++ open-iscsi-2.0-872/utils/fwparam_ibft/Makefile 2010-08-11 15:27:07.000000000 +0000 +@@ -38,6 +38,6 @@ + $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h + + depend: ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend +- gcc $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -NuarwbB open-iscsi-2.0-872/utils/Makefile open-iscsi-2.0-872.orig/utils/Makefile +--- open-iscsi-2.0-872.orig/utils/Makefile 2012-02-09 08:57:37.825877235 +0000 ++++ open-iscsi-2.0-872/utils/Makefile 2012-02-09 08:56:51.145736633 +0000 +@@ -12,6 +12,6 @@ + rm -f *.o $(PROGRAMS) .depend + + depend: ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend +- gcc $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -NuarwbB open-iscsi-2.0-872/utils/open-isns/Makefile.in open-iscsi-2.0-872.orig/utils/open-isns/Makefile.in +--- open-iscsi-2.0-872.orig/utils/open-isns/Makefile.in 2012-02-09 08:57:47.812573971 +0000 ++++ open-iscsi-2.0-872/utils/open-isns/Makefile.in 2010-08-11 15:27:07.000000000 +0000 +@@ -77,6 +77,6 @@ + ar cr $@ $(LIBOBJS) + + depend: ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend +- gcc $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -NuarwbB open-iscsi-2.0-872/utils/sysdeps/Makefile open-iscsi-2.0-872.orig/utils/sysdeps/Makefile +--- open-iscsi-2.0-872.orig/utils/sysdeps/Makefile 2012-02-09 08:57:43.459227530 +0000 ++++ open-iscsi-2.0-872/utils/sysdeps/Makefile 2010-08-11 15:27:07.000000000 +0000 +@@ -10,6 +10,6 @@ + rm -f *.o .depend + + depend: ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend +- gcc $(CFLAGS) -M `ls *.c` > .depend + + -include .depend diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch new file mode 100644 index 000000000000..b3e93f459fc2 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.872-makefile-cleanup.patch @@ -0,0 +1,20 @@ +--- usr/Makefile 2010-10-10 22:48:04.000000000 +0200 ++++ usr/Makefile.ori 2010-10-10 22:48:34.000000000 +0200 +@@ -53,14 +53,14 @@ + + iscsid: $(ISCSI_LIB_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \ + iscsid.o session_mgmt.o discoveryd.o +- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto + + iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o +- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns -lcrypto + + iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ + iscsistart.o statics.o +- $(CC) $(CFLAGS) -static $^ -o $@ ++ $(CC) $(CFLAGS) -static $(LDFLAGS) $^ -o $@ + clean: + rm -f *.o $(PROGRAMS) .depend $(LIBSYS) + diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch new file mode 100644 index 000000000000..db5d6d14ec5a --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.873-Makefiles.patch @@ -0,0 +1,161 @@ +diff --git a/Makefile b/Makefile +index c5d9700..4dbff18 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,8 +14,8 @@ mandir = $(prefix)/share/man + etcdir = /etc + initddir = $(etcdir)/init.d + +-MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 +-PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname ++MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 doc/iscsistart.8 doc/iscsi-iname.8 ++PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname usr/iscsistart + INSTALL = install + ETCFILES = etc/iscsid.conf + IFACEFILES = etc/iface.example +@@ -84,11 +84,11 @@ install_programs: $(PROGRAMS) + # ugh, auto-detection is evil + # Gentoo maintains their own init.d stuff + install_initd: +- if [ -f /etc/debian_version ]; then \ ++ if [ -f $(DESTDIR)$(etcdir)/debian_version ]; then \ + $(MAKE) install_initd_debian ; \ +- elif [ -f /etc/redhat-release ]; then \ ++ elif [ -f $(DESTDIR)$(etcdir)/redhat-release ]; then \ + $(MAKE) install_initd_redhat ; \ +- elif [ -f /etc/SuSE-release ]; then \ ++ elif [ -f $(DESTDIR)$(etcdir)/SuSE-release ]; then \ + $(MAKE) install_initd_suse ; \ + fi + +@@ -115,7 +115,7 @@ install_iface: $(IFACEFILES) + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces + + install_etc: $(ETCFILES) +- if [ ! -f /etc/iscsi/iscsid.conf ]; then \ ++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \ + $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \ + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \ + fi +@@ -128,11 +128,11 @@ install_kernel: + $(MAKE) -C kernel install_kernel + + install_iname: +- if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then \ +- echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \ ++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ]; then \ ++ echo "InitiatorName=`$(DESTDIR)$(sbindir)/iscsi-iname`" > $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ; \ + echo "***************************************************" ; \ +- echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \ +- echo "To override edit /etc/iscsi/initiatorname.iscsi" ; \ ++ echo "Setting InitiatorName to `cat $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi`" ; \ ++ echo "To override edit $(etcdir)/iscsi/initiatorname.iscsi" ; \ + echo "***************************************************" ; \ + fi + +diff --git a/usr/Makefile b/usr/Makefile +index 673b7f1..83507f3 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -54,18 +54,18 @@ all: $(PROGRAMS) + + iscsid: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(DISCOVERY_SRCS) \ + iscsid.o session_mgmt.o discoveryd.o +- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns + + iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o +- $(CC) $(CFLAGS) $^ -o $@ -L../utils/open-isns -lisns ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -L../utils/open-isns -lisns + + iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ + iscsistart.o statics.o +- $(CC) $(CFLAGS) -static $^ -o $@ ++ $(CC) $(CFLAGS) -static $(LDFLAGS) $^ -o $@ + clean: +- rm -f *.o $(PROGRAMS) .depend $(LIBSYS) ++ $(RM) *.o $(PROGRAMS) .depend $(LIBSYS) + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff --git a/utils/Makefile b/utils/Makefile +index 2c7e891..62c49fa 100644 +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -1,17 +1,18 @@ + # This Makefile will work only with GNU make. + +-CFLAGS += $(OPTFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g ++OPTFLAGS ?= -O2 -g ++CFLAGS += $(OPTFLAGS) -fno-inline -Wall -Wstrict-prototypes + PROGRAMS = iscsi-iname + + all: $(PROGRAMS) + + iscsi-iname: md5.o iscsi-iname.o +- $(CC) $(CFLAGS) $^ $(DBM_LIB) -o $@ ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ + + clean: +- rm -f *.o $(PROGRAMS) .depend ++ $(RM) *.o $(PROGRAMS) .depend + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(GCC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff --git a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile +index c72bb7f..a36c2d2 100644 +--- a/utils/fwparam_ibft/Makefile ++++ b/utils/fwparam_ibft/Makefile +@@ -26,18 +26,18 @@ OBJS := fw_entry.o fwparam_sysfs.o $(SYSDEPS_OBJS) ../../usr/iscsi_net_util.o + OBJS += prom_lex.o prom_parse.tab.o fwparam_ppc.o + CLEANFILES = $(OBJS) *.output *~ + +-OPTFLAGS ?= -O2 -g -fPIC ++OPTFLAGS ?= -O2 -g + WARNFLAGS ?= -Wall -Wstrict-prototypes +-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../../include -I../../usr -D_GNU_SOURCE ++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fPIC -I../../include -I../../usr -D_GNU_SOURCE + + all: $(OBJS) + + clean: +- rm -f *.o $(CLEANFILES) .depend ++ $(RM) *.o $(CLEANFILES) .depend + + $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff --git a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile +index 53c10e5..19cfe19 100644 +--- a/utils/sysdeps/Makefile ++++ b/utils/sysdeps/Makefile +@@ -1,15 +1,16 @@ + # This Makefile will work only with GNU make. + +-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -O2 -fno-inline -Wall -Wstrict-prototypes -g ++OPTFLAGS ?= -O2 -g ++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -fno-inline -Wall -Wstrict-prototypes + + SYSDEPS_OBJS=sysdeps.o + + all: $(SYSDEPS_OBJS) + + clean: +- rm -f *.o .depend ++ $(RM) *.o .depend + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch new file mode 100644 index 000000000000..c56669192f09 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch @@ -0,0 +1,24 @@ +clear the size of the storage, not the size of the pointer + +--- a/usr/md5.c ++++ b/usr/md5.c +@@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx) + + byteSwap(ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + + #ifndef ASM_MD5 +--- a/utils/md5.c ++++ b/utils/md5.c +@@ -133,7 +133,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx) + + byteSwap(ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof (ctx)); /* In case it's sensitive */ ++ memset(ctx, 0, sizeof (*ctx)); /* In case it's sensitive */ + } + + #ifndef ASM_MD5 diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch new file mode 100644 index 000000000000..33c5d8a960d0 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch @@ -0,0 +1,116 @@ +diff -dur a/Makefile b/Makefile +--- a/Makefile 2016-09-29 13:33:24.000000000 -0500 ++++ b/Makefile 2017-01-02 11:25:04.606549073 -0600 +@@ -14,8 +14,8 @@ + etcdir = /etc + initddir = $(etcdir)/init.d + +-MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 iscsiuio/docs/iscsiuio.8 +-PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname iscsiuio/src/unix/iscsiuio ++MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 doc/iscsistart.8 doc/iscsi-iname.8 ++PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname usr/iscsistart + INSTALL = install + ETCFILES = etc/iscsid.conf + IFACEFILES = etc/iface.example +@@ -99,11 +99,11 @@ + # ugh, auto-detection is evil + # Gentoo maintains their own init.d stuff + install_initd: +- if [ -f /etc/debian_version ]; then \ ++ if [ -f $(DESTDIR)$(etcdir)/debian_version ]; then \ + $(MAKE) install_initd_debian ; \ +- elif [ -f /etc/redhat-release ]; then \ ++ elif [ -f $(DESTDIR)$(etcdir)/redhat-release ]; then \ + $(MAKE) install_initd_redhat ; \ +- elif [ -f /etc/SuSE-release ]; then \ ++ elif [ -f $(DESTDIR)$(etcdir)/SuSE-release ]; then \ + $(MAKE) install_initd_suse ; \ + fi + +@@ -130,7 +130,7 @@ + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces + + install_etc: $(ETCFILES) +- if [ ! -f $(DESTDIR)/etc/iscsi/iscsid.conf ]; then \ ++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \ + $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \ + $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \ + fi +@@ -143,11 +143,11 @@ + $(MAKE) -C kernel install_kernel + + install_iname: +- if [ ! -f $(DESTDIR)/etc/iscsi/initiatorname.iscsi ]; then \ +- echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > $(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \ ++ if [ ! -f $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ]; then \ ++ echo "InitiatorName=`$(DESTDIR)$(sbindir)/iscsi-iname`" > $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ; \ + echo "***************************************************" ; \ +- echo "Setting InitiatorName to `cat $(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \ +- echo "To override edit $(DESTDIR)/etc/iscsi/initiatorname.iscsi" ; \ ++ echo "Setting InitiatorName to `cat $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi`" ; \ ++ echo "To override edit $(etcdir)/iscsi/initiatorname.iscsi" ; \ + echo "***************************************************" ; \ + fi + +diff -dur a/usr/Makefile b/usr/Makefile +--- a/usr/Makefile 2016-09-29 13:33:24.000000000 -0500 ++++ b/usr/Makefile 2017-01-02 11:27:55.417297639 -0600 +@@ -63,9 +63,9 @@ + iscsistart.o statics.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt + clean: +- rm -f *.o $(PROGRAMS) .depend $(LIBSYS) ++ $(RM) *.o $(PROGRAMS) .depend $(LIBSYS) + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -dur a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile +--- a/utils/fwparam_ibft/Makefile 2016-09-29 13:33:24.000000000 -0500 ++++ b/utils/fwparam_ibft/Makefile 2017-01-02 11:30:42.358440507 -0600 +@@ -33,11 +33,11 @@ + all: $(OBJS) + + clean: +- rm -f *.o $(CLEANFILES) .depend ++ $(RM) *.o $(CLEANFILES) .depend + + $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -dur a/utils/Makefile b/utils/Makefile +--- a/utils/Makefile 2016-09-29 13:33:24.000000000 -0500 ++++ b/utils/Makefile 2017-01-02 11:29:24.193611039 -0600 +@@ -10,9 +10,9 @@ + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@ + + clean: +- rm -f *.o $(PROGRAMS) .depend ++ $(RM) *.o $(PROGRAMS) .depend + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(GCC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend +diff -dur a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile +--- a/utils/sysdeps/Makefile 2016-09-29 13:33:24.000000000 -0500 ++++ b/utils/sysdeps/Makefile 2017-01-02 11:31:24.219926338 -0600 +@@ -8,9 +8,9 @@ + all: $(SYSDEPS_OBJS) + + clean: +- rm -f *.o .depend ++ $(RM) *.o .depend + + depend: +- gcc $(CFLAGS) -M `ls *.c` > .depend ++ $(CC) $(CFLAGS) -M `ls *.c` > .depend + + -include .depend diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch new file mode 100644 index 000000000000..12b82c71405c --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch @@ -0,0 +1,69 @@ +From: Anthony G. Basiel <blueness@gentoo.org> + +diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c +--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c 2016-09-29 18:33:24.000000000 +0000 ++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c 2017-01-03 21:45:47.504035833 +0000 +@@ -42,7 +42,7 @@ + #include <arpa/inet.h> + #include <linux/types.h> /* Needed for linux/ethtool.h on RHEL 5.x */ + #include <linux/sockios.h> +-#include <linux/ethtool.h> ++#include "ethtool-compat.h" + #include <sys/mman.h> + #include <sys/ioctl.h> + #include <sys/types.h> +diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h +--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h 1970-01-01 00:00:00.000000000 +0000 ++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h 2017-01-03 21:45:23.016034980 +0000 +@@ -0,0 +1,51 @@ ++/* ++ * ethtool-compat.h: adopted from ++ # ethtool.h: Defines for Linux ethtool. ++ * ++ * Copyright (C) 1998 David S. Miller (davem@redhat.com) ++ * Copyright 2001 Jeff Garzik <jgarzik@pobox.com> ++ * Portions Copyright 2001 Sun Microsystems (thockin@sun.com) ++ * Portions Copyright 2002 Intel (eli.kupermann@intel.com, ++ * christopher.leech@intel.com, ++ * scott.feldman@intel.com) ++ * Portions Copyright (C) Sun Microsystems 2008 ++ */ ++ ++#include <linux/types.h> ++#include <netinet/if_ether.h> ++ ++#define ETHTOOL_FWVERS_LEN 32 ++#define ETHTOOL_BUSINFO_LEN 32 ++#define ETHTOOL_EROMVERS_LEN 32 ++ ++struct ethtool_drvinfo { ++ __u32 cmd; ++ char driver[32]; ++ char version[32]; ++ char fw_version[ETHTOOL_FWVERS_LEN]; ++ char bus_info[ETHTOOL_BUSINFO_LEN]; ++ char erom_version[ETHTOOL_EROMVERS_LEN]; ++ char reserved2[12]; ++ __u32 n_priv_flags; ++ __u32 n_stats; ++ __u32 testinfo_len; ++ __u32 eedump_len; ++ __u32 regdump_len; ++}; ++ ++struct ethtool_tcpip4_spec { ++ __be32 ip4src; ++ __be32 ip4dst; ++ __be16 psrc; ++ __be16 pdst; ++ __u8 tos; ++}; ++ ++struct ethtool_ah_espip4_spec { ++ __be32 ip4src; ++ __be32 ip4dst; ++ __be32 spi; ++ __u8 tos; ++}; ++ ++#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */ diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch new file mode 100644 index 000000000000..cf8b76210b99 --- /dev/null +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch @@ -0,0 +1,51 @@ +--- ./utils/fwparam_ibft/fwparam_ppc.c 2016-09-29 13:33:24.000000000 -0500 ++++ ./utils/fwparam_ibft/fwparam_ppc.c 2017-01-02 11:37:32.738351217 -0600 +@@ -356,7 +356,7 @@ + * Sort the nics into "natural" order. The proc fs + * device-tree has them in somewhat random, or reversed order. + */ +- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp); ++ qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp); + + snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases"); + dev_count = 0; +--- ./usr/idbm.c.orig ++++ ./usr/idbm.c +@@ -25,6 +25,7 @@ + #include <stdlib.h> + #include <string.h> + #include <errno.h> ++#include <fcntl.h> + #include <dirent.h> + #include <limits.h> + #include <sys/stat.h> +--- a/usr/iscsiadm.c 2016-09-29 13:33:24.000000000 -0500 ++++ b/usr/iscsiadm.c 2017-01-02 11:46:37.643506953 -0600 +@@ -3262,6 +3262,7 @@ + int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0; + int packet_size=32, ping_count=1, ping_interval=0; + int do_discover = 0, sub_mode = -1; ++ int argerror = 0; + int portal_type = -1; + struct sigaction sa_old; + struct sigaction sa_new; +@@ -3426,6 +3427,9 @@ + break; + case 'h': + usage(0); ++ case '?': ++ log_error("unrecognized character '%c'", optopt); ++ argerror = 1; + } + + if (name && value) { +@@ -3441,8 +3445,7 @@ + } + } + +- if (optopt) { +- log_error("unrecognized character '%c'", optopt); ++ if (argerror) { + rc = ISCSI_ERR_INVAL; + goto free_ifaces; + } diff --git a/sys-block/open-iscsi/metadata.xml b/sys-block/open-iscsi/metadata.xml new file mode 100644 index 000000000000..b84660b0b8e9 --- /dev/null +++ b/sys-block/open-iscsi/metadata.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="tcp">Support iSCSI over TCP</flag> + <flag name="rdma">Support iSCSI over RDMA</flag> + </use> + <upstream> + <remote-id type="github">open-iscsi/open-iscsi</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild new file mode 100644 index 000000000000..33add91a2b45 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.872-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit versionator linux-info eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)" +SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86" +IUSE="debug slp" +DEPEND="slp? ( net-libs/openslp )" +RDEPEND="${DEPEND} + sys-apps/util-linux" + +S="${WORKDIR}/${MY_PV}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtion options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi +} + +src_prepare() { + export EPATCH_OPTS="-d${S}" + epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup.patch + epatch "${FILESDIR}"/${P}-glibc212.patch + epatch "${FILESDIR}"/${P}-dont-call-configure.patch + epatch "${FILESDIR}"/${P}-ldflags.patch + epatch "${FILESDIR}"/${P}-isns-slp.patch + epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup-pass2.patch +} + +src_configure() { + cd utils/open-isns || die + econf $(use_with slp) +} + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + einfo "Building userspace" + local SLP_LIBS + use slp && SLP_LIBS="-lslp" + cd "${S}" && \ + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS}" SLP_LIBS="${SLP_LIBS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user \ + || die "emake failed" +} + +src_install() { + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart || die + + einfo "Installing utilities" + dosbin utils/iscsi-iname utils/iscsi_discovery || die + + einfo "Installing docs" + doman doc/*[1-8] || die + dodoc README THANKS || die + docinto test || die + dodoc test/* || die + + einfo "Installing configuration" + insinto /etc/iscsi + doins etc/iscsid.conf || die + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example || die + insinto /etc/iscsi/ifaces + doins etc/iface.example || die + + newconfd "${FILESDIR}"/${P}-conf.d iscsid || die + newinitd "${FILESDIR}"/${P}-init.d-r1 iscsid || die + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi || die + fperms 600 /etc/iscsi/iscsid.conf || die +} + +pkg_postinst() { + in='/etc/iscsi/initiatorname.iscsi' + if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then + cp -f "${ROOT}${in}.example" "${ROOT}${in}" + fi +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild new file mode 100644 index 000000000000..fc5ff0ea8915 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.872-r3.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit versionator linux-info eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +MY_PV="${PN}-$(replace_version_separator 2 "-" $MY_PV)" +SRC_URI="http://www.open-iscsi.org/bits/${MY_PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug slp" +DEPEND="slp? ( net-libs/openslp )" +RDEPEND="${DEPEND} + virtual/udev + sys-fs/lsscsi + sys-apps/util-linux" + +S="${WORKDIR}/${MY_PV}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtion options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi +} + +src_prepare() { + export EPATCH_OPTS="-d${S}" + epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup.patch + epatch "${FILESDIR}"/${P}-glibc212.patch + epatch "${FILESDIR}"/${P}-dont-call-configure.patch + epatch "${FILESDIR}"/${P}-ldflags.patch + epatch "${FILESDIR}"/${P}-isns-slp.patch + epatch "${FILESDIR}"/${PN}-2.0.872-makefile-cleanup-pass2.patch +} + +src_configure() { + cd utils/open-isns || die + econf $(use_with slp) +} + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + einfo "Building userspace" + local SLP_LIBS + use slp && SLP_LIBS="-lslp" + cd "${S}" && \ + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS}" SLP_LIBS="${SLP_LIBS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user \ + || die "emake failed" +} + +src_install() { + einfo "Installing userspace" + dosbin usr/iscsid usr/iscsiadm usr/iscsistart || die + + einfo "Installing utilities" + dosbin utils/iscsi-iname utils/iscsi_discovery || die + + einfo "Installing docs" + doman doc/*[1-8] || die + dodoc README THANKS || die + docinto test || die + dodoc test/* || die + + einfo "Installing configuration" + insinto /etc/iscsi + doins etc/iscsid.conf || die + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example || die + insinto /etc/iscsi/ifaces + doins etc/iface.example || die + + newconfd "${FILESDIR}"/${P}-conf.d iscsid || die + newinitd "${FILESDIR}"/${P}-init.d-r1 iscsid || die + + # udev pieces + insinto /etc/udev/scripts + doins "${FILESDIR}"/iscsidev.sh + insinto /lib/udev/rules.d + doins "${FILESDIR}"/99-iscsi.rules + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi || die + fperms 600 /etc/iscsi/iscsid.conf || die +} + +pkg_postinst() { + in='/etc/iscsi/initiatorname.iscsi' + if [ ! -f "${ROOT}${in}" -a -f "${ROOT}${in}.example" ]; then + cp -f "${ROOT}${in}.example" "${ROOT}${in}" + fi +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild new file mode 100644 index 000000000000..db8bd4e65fa2 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit versionator linux-info eutils flag-o-matic toolchain-funcs udev + +MY_P="${PN}-$(replace_version_separator 2 "-")" + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86" +IUSE="debug slp" + +DEPEND="slp? ( net-libs/openslp )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtion options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-Makefiles.patch + epatch "${FILESDIR}"/${P}-memset.patch + + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + + cd utils/open-isns || die + + # SSL (--with-security) is broken + econf $(use_with slp) \ + --without-security +} + +src_compile() { + # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build + # is messed up already here, so it's not making it that much worse. + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + udev_dorules "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873-r2.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.873-r2.ebuild new file mode 100644 index 000000000000..d1b340ee2b7a --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.873-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit versionator linux-info eutils flag-o-matic toolchain-funcs udev + +MY_P="${PN}-$(replace_version_separator 2 "-")" + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug slp +tcp infiniband rdma" + +DEPEND="slp? ( net-libs/openslp ) infiniband? ( sys-fabric/ofed )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" +REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )" +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtin options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + RDMA_MODULES="INFINIBAND_ISER" + INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" + CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" + if linux_config_exists; then + if use tcp; then + for module in ${TCP_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use infiniband; then + for module in ${INFINIBAND_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use rdma; then + for module in ${RDMA_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ + done + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-Makefiles.patch + epatch "${FILESDIR}"/${P}-memset.patch + + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + + cd utils/open-isns || die + + # SSL (--with-security) is broken + econf $(use_with slp) \ + --without-security +} + +src_compile() { + # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build + # is messed up already here, so it's not making it that much worse. + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + udev_dorules "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild new file mode 100644 index 000000000000..3902a0021654 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit versionator linux-info eutils flag-o-matic toolchain-funcs udev + +MY_P="${PN}-$(replace_version_separator 2 "-")" + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug slp +tcp infiniband rdma" + +DEPEND="slp? ( net-libs/openslp ) infiniband? ( sys-fabric/ofed )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" +REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )" +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtin options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + RDMA_MODULES="INFINIBAND_ISER" + INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" + CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" + if linux_config_exists; then + if use tcp; then + for module in ${TCP_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use infiniband; then + for module in ${INFINIBAND_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use rdma; then + for module in ${RDMA_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ + done + fi + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-Makefiles.patch + epatch "${FILESDIR}"/${P}-memset.patch + epatch "${FILESDIR}"/musl-fixes.patch + + epatch_user + + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + + cd utils/open-isns || die + + # SSL (--with-security) is broken + econf $(use_with slp) \ + --without-security +} + +src_compile() { + # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build + # is messed up already here, so it's not making it that much worse. + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + udev_dorules "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild new file mode 100644 index 000000000000..7311e4328e68 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.873.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit versionator linux-info eutils flag-o-matic toolchain-funcs + +MY_P="${PN}-$(replace_version_separator 2 "-")" + +DESCRIPTION="Open-iSCSI is a high performance, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc x86" +IUSE="debug slp" + +DEPEND="slp? ( net-libs/openslp )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtion options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + if linux_config_exists; then + for module in ${CONFIG_CHECK_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-Makefiles.patch + + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die +} + +src_configure() { + cd utils/open-isns || die + + # SSL (--with-security) is broken + econf $(use_with slp) \ + --without-security +} + +src_compile() { + use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI + + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + insinto /lib/udev/rules.d + doins "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.874-r1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.874-r1.ebuild new file mode 100644 index 000000000000..4f623960f7be --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.874-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit versionator linux-info flag-o-matic toolchain-funcs udev + +DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug infiniband slp +tcp rdma" + +DEPEND="sys-block/open-isns:= + slp? ( net-libs/openslp ) + infiniband? ( sys-fabric/ofed )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" +REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )" + +PATCHES=( + "${FILESDIR}/${P}-Makefiles.patch" + "${FILESDIR}/${P}-musl-fixes.patch" + "${FILESDIR}/${P}-musl-ethtool-compat.patch" +) + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtin options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + RDMA_MODULES="INFINIBAND_ISER" + INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" + CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" + if linux_config_exists; then + if use tcp; then + for module in ${TCP_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use infiniband; then + for module in ${INFINIBAND_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use rdma; then + for module in ${RDMA_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ + done + fi + fi +} + +src_prepare() { + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die + default +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags +} + +src_compile() { + # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build + # is messed up already here, so it's not making it that much worse. + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + # Upstream make is not deterministic, per bug #601514 + rm -f "${ED}"/etc/initiatorname.iscsi + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + udev_dorules "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} + +pkg_postinst() { + in='/etc/iscsi/initiatorname.iscsi' + if [ ! -f "${EROOT}${in}" -a -f "${EROOT}${in}.example" ]; then + { + cat "${EROOT}${in}.example" + echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)" + echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)" + } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}" + fi +} diff --git a/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild new file mode 100644 index 000000000000..400251eb5d08 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit versionator linux-info flag-o-matic toolchain-funcs udev + +DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720" +HOMEPAGE="http://www.open-iscsi.com/" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug infiniband slp +tcp rdma" + +DEPEND="sys-block/open-isns:= + slp? ( net-libs/openslp ) + infiniband? ( sys-fabric/ofed )" +RDEPEND="${DEPEND} + sys-fs/lsscsi + sys-apps/util-linux" +REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )" + +PATCHES=( + "${FILESDIR}/${P}-Makefiles.patch" + "${FILESDIR}/${P}-musl-fixes.patch" + "${FILESDIR}/${P}-musl-ethtool-compat.patch" +) + +pkg_setup() { + linux-info_pkg_setup + + if kernel_is -lt 2 6 16; then + die "Sorry, your kernel must be 2.6.16-rc5 or newer!" + fi + + # Needs to be done, as iscsid currently only starts, when having the iSCSI + # support loaded as module. Kernel builtin options don't work. See this for + # more information: + # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 + # If there's a new release, check whether this is still valid! + TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" + RDMA_MODULES="INFINIBAND_ISER" + INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" + CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" + if linux_config_exists; then + if use tcp; then + for module in ${TCP_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use infiniband; then + for module in ${INFINIBAND_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" + done + fi + if use rdma; then + for module in ${RDMA_MODULES}; do + linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ + done + fi + fi +} + +src_prepare() { + sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die + default +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags +} + +src_compile() { + # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build + # is messed up already here, so it's not making it that much worse. + KSRC="${KV_DIR}" CFLAGS="" \ + emake \ + OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ + AR="$(tc-getAR)" CC="$(tc-getCC)" \ + user +} + +src_install() { + emake DESTDIR="${ED}" sbindir="/usr/sbin" install + + dodoc README THANKS + + docinto test/ + dodoc test/* + + insinto /etc/iscsi + newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example + + # udev pieces + udev_dorules "${FILESDIR}"/99-iscsi.rules + exeinto /etc/udev/scripts + doexe "${FILESDIR}"/iscsidev.sh + + newconfd "${FILESDIR}"/iscsid-conf.d iscsid + newinitd "${FILESDIR}"/iscsid-init.d iscsid + + keepdir /var/db/iscsi + fperms 700 /var/db/iscsi + fperms 600 /etc/iscsi/iscsid.conf +} |