mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
Merge pull request #1298 from flatcar-linux/krnowak/sys-fs-lvm2-update
sys-fs/lvm2: Sync with gentoo
This commit is contained in:
commit
c6904d9aee
@ -15,7 +15,7 @@ net-misc/iperf threads
|
||||
net-misc/ntp caps
|
||||
sys-apps/smartmontools minimal
|
||||
sys-block/parted device-mapper
|
||||
sys-fs/lvm2 -lvm1 -readline
|
||||
sys-fs/lvm2 -readline
|
||||
sys-libs/ncurses minimal
|
||||
sys-libs/pam -berkdb audit
|
||||
sys-libs/gdbm berkdb
|
||||
|
@ -1,54 +1 @@
|
||||
AUX clvmd.confd-2.02.39 213 SHA256 68442d5c9da81bad79fa6b1beaede290f24ea6a4e4415f3d9f4e37ccca6c524a SHA512 9614c4188c9a5bcf398d1f521b52d7e2281fcdf76265fdaca4acda22be282d8468e82b54a2661d5753f4b9a442ebe93a60daf87c846db4e275a283f71c9fd8e2 WHIRLPOOL b429d06a5200d37f46e72190060bc2fe866575ba441b5f92d12d939bdc5d411ef37e895a7369bbaaf733b1a0d0305a05d499c7ae6c7360fe8767e902d2a3bfc4
|
||||
AUX clvmd.rc-2.02.39 3590 SHA256 50f7297c3a66656832dc7cacb4a6b8614a30748c59a19b56ed479a99e9068c7c SHA512 2a16b700f475a65477d548b4cb5fb26129c86d2244b7b5716ffdb4e9b13cf2e37bc1fc986c080c5c4d1c0e2b5436b0cc6fcb0527c9b98c1b29b85ca512551532 WHIRLPOOL e546e98765c8740b3893f25207694bc6b33fb3d46f15facbf856c41ded17071fbad4c969a826ecc13c8cef06b02198406de0760c685b31390034ee25f7922617
|
||||
AUX device-mapper.conf-1.02.22-r3 15 SHA256 57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22 SHA512 1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e WHIRLPOOL a0de185e849cd4d1aab9f145a6330f267ca547ba4ec7720be6f33e2c3c4c182b8674ea220b894f0fc806fe6637ba7bcabd739ca57b53b3efa5fad0cf1e57ba2e
|
||||
AUX device-mapper.rc-2.02.105-r2 3707 SHA256 e8bfde63341f9e6136ee20a15ed9ea455e2259dbcaea756f8c3d0f710c1c2746 SHA512 9940b1154a8c07cf2f2c975e209bfb1e78913d3ea77ac6334684a9b38c4f4bd34b349b71c078c9ad5700f554046771ee05e17f07b75dc4e7d839f1df2305cc4f WHIRLPOOL 33516cc0046961718dbaf8a0fd3602d8975790d93aaadbb6905b858f411e1c88857bb7d8283dce0b44b0345911c0ad9a14edec3f4e702433d639fca1367a4016
|
||||
AUX dmeventd.initd-2.02.67-r1 565 SHA256 5edaaad292d4fd6b67fd5323636dd2e839be33ae16fbc7872dadb0499fcf22da SHA512 c0f5317ab0cba700eab3b643fd134d8a23fe4b332c47fd94728e43dfdf97250561f60ecb47808d2c65e55cdec65cccbd51f264540c0d973b2df7ded4ec129c34 WHIRLPOOL ee6306caba934ea4d52033631e4598b250a407c3e7a906a0109582c5f3453c8f8f3985a2410aacbd8966b897e389a4b67cb62ed22d75a98d60c7d495f5b1544b
|
||||
AUX dmtab 319 SHA256 f86d54983e26bb36ce1d1a46f15165fed90ec6c76e5881fb04978d77952de874 SHA512 a8cc69ff832eafd64d7e45854df3380a9c5f9648297e2606c5b9b47e0015c93c7da6ef3dfd35800f36a3371635fa1906605c524be82d6740fd435c7f6bf2807b WHIRLPOOL 2ba4aceb6a030421b9384c65e5836de886f67518491c3409f3df1b09c97a4095d66d03e5e726edcad4224572b723012e8b5ccbfca4cd3e1ea46917e50e54bc73
|
||||
AUX lvm-monitoring.initd-2.02.105-r2 963 SHA256 42847d8e6dabbcf2cc19846c6ad22cbab65e9a033c4add569b152504b16ab477 SHA512 dc13304e8d644a55f0490c84acc36b95f43fc0e86c4b44f85f54f6ed3213ad665454e7432b3621f307b3468af0c33525c24705f4a2783e35a26e02ff1c828779 WHIRLPOOL aa417a0dd3c62ed74240579ff56a1a34e5f13b9c2bf40c274290428ef581d971158efd3dacc7ba4e274db37d6d408b3b6bb438c51519fae4dbf540d1283ebffc
|
||||
AUX lvm.confd-2.02.28-r2 173 SHA256 28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844 SHA512 67b153cbc5c2327c15f042b3b5590c1d8fdf9823efb19c80192ac4dcf98e530efea8ecae0aaaa4a54b0e3e4907565aa21455b364df1dbe8f2e7dffa1c5d355d0 WHIRLPOOL 06467b28ad2acf36984eef1b7b7e3d88277505760f848a808d85820cd1cccf6bb7397c00624d36961d9bdbb994e55de03444a7cfc97ecefd9bd3b785a3c6fdbf
|
||||
AUX lvm.rc-2.02.105-r2 2960 SHA256 e5bcc5aeed1ae95cf4199c10fcfa0488d7790e0bafe512c7947902cbd451928d SHA512 8d8ccac694110e3538aeb246244b1b129d960f35d54eb583d77e9d54bed243248b121262557fc0c69bc734a04ca35c0485428e65b1a4d06c438828a239053fae WHIRLPOOL 62d63d64ee444fd573e4511dd64bb799aacd5edabf817788155268b27f71004e7c44659f78b7f3e4e81e74054967da99b2569005866f98f020731815e95ab083
|
||||
AUX lvm.rc-2.02.116-r4 3771 SHA256 c7044358d8bde5f9786f40fa126011612c2255ee38bd540f5482608cbe8d9bef SHA512 aa19a17ea3c6626355ac6f82aa383e7a9b253248513d7ef876e381d1a58ab78267e0e39df95a53114675582312693a128cf517051f906aa17a244f8d398f3aed WHIRLPOOL 78b241ddfe9ed4b407d0e014074a87a0de7fb6cfbdd2293d631ff3fcd2fc458e26a8e0c870b7bdb3b9db13c604e9df93686c3dbb75378d28a1fd3a4b880fa3e4
|
||||
AUX lvm.rc-2.02.116-r6 3783 SHA256 088285a83ab2ea527126c36eeb72181f42815bd32b95e4442ad2b8a1c94600e5 SHA512 f819faf7844c3b946b437aee8eb5dd52bfdbb9b820a2024ad42166895e72e194898b16a34c44c69786539d19e5458c12a333f99db02c26589567bb6aabb23639 WHIRLPOOL bf10b0ba73200d17a71ecf6c4d8a3bcef9e23a2807d3e8ae432021bf2b1fe9c48931ac40af2d3f8bfd9a3cf3c4bd1e301ead404a3cd3e939d395b708963b07f6
|
||||
AUX lvm.rc-2.02.166-r2 4146 SHA256 257e6801b1d2890fe77b7d030489066d9129712eae395b77ae5e9e461d435f80 SHA512 a08891d52d1b7f38d09d15100ae19737ab6b65ae51f1e5d2ca43dd08988fee272972ea02fb3a04240d56812089a0744d215fed87e2ed29d09cfccba0de59d3c7 WHIRLPOOL 94bb01f3595869cd393994621b1e0e0770842d3e284dad0d109ba0fd6a64cd261d7ef55f19ce015c7e6d20609b66b21ee06d396f2230591bcbc5ad0ffe34d619
|
||||
AUX lvm2-2.02.106-pthread-pkgconfig.patch 860 SHA256 aaf04bdb140cbedebe731a04846cbb7459cdd002ee4616a3d0725136edb5ef02 SHA512 ae073936ee15fdeabde4d3948a65f6a435b82e62aa0ddadbad399b69bd5c9bfc181d5e0be1beae9f6e899a6e8b9d7c21add13f7a1606cb5ed4762ed5aa5aa223 WHIRLPOOL 9e822f0f1c7c67b5443fb9e62547a1893d8c91f91d63f03c9f4b3d9a20cd24c377f5697f2fe24028f10949550af6f2a05d95db6d5e29700dfaa05f1c3d615773
|
||||
AUX lvm2-2.02.108-example.conf.in.patch 1681 SHA256 c9e0b46965f68c25495e21ca9504699031ed88dbb69407a08d53569ddc88ae4c SHA512 b4e983892b7ff47e5e7617376197daa62cfd063cf398235dc4a436fd9025ec4b1e263d7418e2c2943d53be494cba4209e9d4230d54a78762b0ca526f92e9746c WHIRLPOOL 0fc73d8e6f47596fa1789118aefebf931fb217342259da838d701bdeb96f21d7de59f29ac81c3c0f4a00db711e86b9fac6b4c889cf05ffc90ad8fd5a9ef77cd1
|
||||
AUX lvm2-2.02.108-static-pkgconfig-libs.patch 3302 SHA256 5cbdb4c4db1a77767a8cf3a89490eb0e21a2d4cc7729a8ffb099e4d0746e2775 SHA512 246f1029f9346d6bc57c2062c8a223535d0b832fa6bd86947b8b91b094dbc388706a9914f9ca0531666f77e73544612e2819335435b7576b4e91cdb1b0e4f041 WHIRLPOOL 53e723bdcfe07f668abf6fe9e6093ae38d81b01bd10ade0b40a037d44c367a6945ed86d14d70c2af8af6e7063763fd3620591b5c7384bd255b98cceb7ee192f3
|
||||
AUX lvm2-2.02.129-dynamic-static-ldflags.patch 2250 SHA256 dacd53356c8287f2dcedf6d4cf9aa3664a0fcdbc1a03d691abce29d49a7a0fa9 SHA512 43884e69dab82d417d9e834b528034b985d6e7cd2d7bdd3a2e30a03fe114670d56bf3b9e6c2d670275261f1eebb97125eb2f2abe53904866c220e16f9d6effa7 WHIRLPOOL 79e76ce5a7bcf875293dc11d2897a6089c069a7039b0a72056f1fa50f73129409153078fbde5fdf14b59ff2e1afd8bea9bd6b6fa0841d2e1dd53212e0f0d5508
|
||||
AUX lvm2-2.02.129-example.conf.in.patch 1844 SHA256 0a5f5dfbeb36da9320c936752fa4e240c5ea82307321098e0c59e43e153548cc SHA512 a2bceec0d051fd2f7749e702d6bbabbc0edf98b11b3211256d2a49d781b1fe89071f36052045726b11b0e0bdd98242b88fc57128a048a7d6d6448c298a6233ed WHIRLPOOL a00b9e37be876377e9b156a9c4674a0d731766c73bb5b297d948ddfb4fb069732b159ea909a35682a95438647060b238303a85c97f350c47e45b97c90c536226
|
||||
AUX lvm2-2.02.129-static-pkgconfig-libs.patch 3299 SHA256 fb8ca89e330096a0a0abb80db1922b54b4ed84408863de07ec3dc7a2d882b302 SHA512 28906793a51737679e51bf83298388ea3ca081f513d34b4c38f3fa09f574c9957f4eedfde0179e31be90631e12d41c78b3bb4bb74c069a99a69ae703f3a2f2f7 WHIRLPOOL 9f0f25896dae3f750262514a0e2f8a29a8edb1f949fc41518da98cf991d24e8216003aff7a3fba535ac1a75e8686d8dc297375da52f2188cd7b309b8067758d6
|
||||
AUX lvm2-2.02.130-pthread-pkgconfig.patch 915 SHA256 7df0c39dcbb0e24381327e5b08e377fc80bc7e5d990abf4f3f2b3e0fc5158adc SHA512 1e45ccb3bf824fd2f8276b4ca103e95960e401e793944af68a16929040015b42d601b09adbb8f01e833071d501440a20381fe263fd1884d8fb2e7d7f5463da6d WHIRLPOOL bc5805586fd58db54c538d4d87621389ebfb4b7146b46390719c4c3d983222ec51616667b2871ff754a0348f47b210288f8fe3cbe17f95206d97a61cc1b32b8f
|
||||
AUX lvm2-2.02.139-dynamic-static-ldflags.patch 2874 SHA256 2f09df6fe503f426e9970e9243e6380654dd4037b8475a371e56ee6ed4287c46 SHA512 3486c6d0500f233cbedfe28a2c20f03e4a80301e011fa0fd41b3765eed71dc5e00c8f6f09d40c3702ea87e372db3e4dae64c32e4ffe45700bbbf137804b748fa WHIRLPOOL 427e8be7dab3afcd4bfa8bbec86d691ed99d98eb52ebe7c740eec7a90bb42dce92fc127ca3ef0a6f6da07041a3682f59b1937b836ccd0a8733200e538e53ccc0
|
||||
AUX lvm2-2.02.145-mkdev.patch 4111 SHA256 d9a351f8d1321d5a374b648845ecdb51f74fa23a4ff8b58757d3e184649c42bc SHA512 f3953eb8bf73adc8d048edd2c560fad3c5afbfcee19ca354f06de2b10ea2e947c972cd180fa26cf0d3dc30b5aae8946e79faac3f3a1cfb6f31222244d308a588 WHIRLPOOL cd9b3148835afa9cbb15790438e2272aab0748f88080636fe477527dadcfc5b0ea293c5f75e3e16fe9705bc3f4384d86345052baeb153a489e00fc5ce02530f6
|
||||
AUX lvm2-2.02.56-lvm2create_initrd.patch 2032 SHA256 b892d0544e05350e78ea400c16e6fd3657671d9bdf50bfae70505fd79bdda081 SHA512 b2a1705fa6b962027ebc5047583547489afe8ef8d8977c6284a28d0a8b0e05e20e6c48bd6c02a8bb02de9cfb40ac2d6e2a4b8ed8ef8c4ae7b6ea9a29bc4194de WHIRLPOOL cb533df528be0aae4bf50966285ef7a238f810d955ee86d5b446f43944d093732eff6ef8178d1654c4a2c075049ffc11994a99de6291bab1140cb8812be8b8a0
|
||||
AUX lvm2-2.02.63-always-make-static-libdm.patch 1420 SHA256 1c498b5efce77ed16bbbfcd9e0ec6da404a9c70c7ad0959ed7b60733adfcfc21 SHA512 67735af9e51369d5b3b400cab4f9ffa25f8dea1c1ec3d01855cb3c5aeade5c39a35eeed43f3a665204fe6bbba4ca43baecd845330bf26d023064b94ca3d1317c WHIRLPOOL f273c893acedfd658e7947abb5f4b528f15de9808ae3862ec8a9189ba7de4ea6998dc67dbc7af642ca3a27bba2ef8eabfd48337f532145f88500988f564313b1
|
||||
AUX lvm2-2.02.67-createinitrd.patch 660 SHA256 d59f5642fff9d9575227bfd0b3d103d928a6f7b08b417d6c458704171f11da39 SHA512 17fbba5d34ece5c1c25ef35fa3bbc3d6fcd20b44bd766c049bbc120853a8d60c9544db5790645a7814db5c272fd12d383699a8a9be6f4e9c56a7c0a1bb29ade2 WHIRLPOOL b358a31a9ee669a4fccf42280da5342c214932bfd83deee92d41351eb37dc6c0b2e5dc7419f2304128b5d285fed92db5b2e1634a71bbf1310d36b54d1a353bb0
|
||||
AUX lvm2-2.02.70-asneeded.patch 336 SHA256 0f1ec293f2cb37345c247bb4b8c3603f1b5d41bb4f62604520e708998f58ce4a SHA512 c4aa5b7120c5b28a3d646b50b561060553dedba766348260e5db6d56776f1474cec09daeab50e1aca2e1d2d166b9ed57e83673b92bc1c305669c13a719696600 WHIRLPOOL 1d1f0bcb62d8c6dcbe9f87c13de6f03d4e9ae0104373fc565bc83a75e299e5e9b3012ce659e73d551f468a9ba70991cefde7abb52061d39c405750f94c27be4c
|
||||
AUX lvm2-2.02.92-dynamic-static-ldflags.patch 3031 SHA256 90b880572186d4d1abf049d39e5f11e4cfedb3707c29eeb9740ceccdb3b62468 SHA512 edb78081d12bebaccd31c2474cb531563b729f1ad966afaff7892556177ee7a68217cc699c65383318066139ba62183adc8334f46f8f8933d62b6b5dcd11a023 WHIRLPOOL 6880a29dfb6747f167c41506e1472c0d48ef7af3a545238c733949f85f3f8f36110fb6908c6f626260f7ed975e56a4e8ccf42ece4d758fa3570154cbe970f2a3
|
||||
AUX lvm2-2.02.99-locale-muck.patch 405 SHA256 fa135beaec5a75a271852da44009390e040c53ca05d6932e9565315ee1cd28ef SHA512 1c898693f71d165d55458ab87886a25206930c202b5aea95eba394ad06162cc710c1435e598acb9bcd3fbf46abf5409be972f6ce73bd02b2e177e1af780ae7ad WHIRLPOOL 68f6383c23f23820c964ab11c7581c18661281703b8ae8ccffcf6ff5cbc52c7265f642a3f5130d901c0d44e75132868c47e60830b8bc296555c143aa4eb4f95e
|
||||
AUX lvmetad.initd-2.02.105-r2 287 SHA256 5b4c806ef07acdb1d3a8c8a8eda7c43ebc88760a7e9034dd81269fb6c2a44cbf SHA512 5fe1a47a1c54546af70c64fc001db3111e519cb81d8672761b64f50b4c552d0fa79bd0770fb4f4f3e0e0ac584b1e13ea91ac1a33cea1cc1f484cff0dde1a3b0b WHIRLPOOL e9a12a7bf17e3bf8b76132a067a1cb395e92c53757e5a2e102aa5024e71b779fdcd23f32331eb628aff94eeb76bea6ef87ec575ea9528754ee349a0b9b6710a4
|
||||
AUX lvmetad.initd-2.02.116-r3 348 SHA256 e7f17004d505eae5d8a2fb336b22f1cdb20bb2ecf85a98daf2485bb4b0d4ff12 SHA512 19aafd07aa6ebe3f05e321048480f746a9aafd1ad4e0323486db5c54035430f607e171d2246e91bbbf8a2a7e15278d793ad13d84e824df7af65345070483a696 WHIRLPOOL d11b18ec2b933c0fcb89a1dc913130ba3f0bd003c65b5f703f92c108e6ca4d00190b9a0b948b0afde13d2017a34da3fab8f2354a2324228597fcac3676fc2265
|
||||
AUX lvmlockd.initd-2.02.166-r1 393 SHA256 c7c3c7dfa651030fd277ba6713bd8cc6bfa361068e90316cbf8d501f42eeabf9 SHA512 11d6f186799d8628220eccb4823e5bd251bc3c447e6c3f8a63c025dc4e08e0a7638a8439967ea2ee8a717264887597be4992afca59571ebaa651441782288081 WHIRLPOOL 8d0ace7512b27027a70211097ee661a877fe3c2da5d28c0d863dc21d207f6198cacba0a6f86d620e8387fda7c3f996689da5e971e96a9466a2ea9a713b88636b
|
||||
DIST LVM2.2.02.116.tgz 1538340 SHA256 2479d6ea61c405efcfcd8a78390d00c1d2e9c92c0262f3ed599f2c0fb6f0b767 SHA512 992541339637d597257850b4ff7f5348fb7cdcccf806ac8d986a3be1ad1edc5f6bfaedeed5128690c541d1a485cdc75742e90a766363c39867901003518fb84d WHIRLPOOL 1e89ec941882fddba62c9649be46eb5bc6c9cb899669d4bbe4a4a1023c8bf7d8264c4815ef88bb39dedcb9637815411feb826aa102e629d77b80e45e099e398d
|
||||
DIST LVM2.2.02.136.tgz 1891010 SHA256 c6af90097d8f7cd851d38c4f57bb3ad7039cfa123f1e336dba957814a298bd8c SHA512 ebda683e7dbeb2c4860a583d47e60756d18127e37a373ab2958af8e54b9bee0d2e3370b7803d88fa4b08564345c88af55bfbac317081160118ce4b3733b69f9d WHIRLPOOL 8020fdddac648e32084801ffaf9b00b8a683870c8dd8dd5969851fd081eb1efd578decd82cd4a7a24fb6150c55afafdd819a76eb7eb6926cdc057455cc1d1618
|
||||
DIST LVM2.2.02.139.tgz 1897293 SHA256 f423b1f2eee70efd671afc0982caa92e9413a582404057244021314172ec3a07 SHA512 f112207d7447606915026495b931bffc4c0d68d36b9a8792fe4b7abf8b743bc4559da5c79145cb4d457337118e60552f9df511e31f2799001d29d006f7946cc0 WHIRLPOOL 8a1ca0bb6946b1f6761223a4a9e7c5e3e5247ff4b85bc08734258f4616fbabb0ea7a3b22b4a245367997ad810b4b304b747d8da0bd128c241fbafe645855b7f9
|
||||
DIST LVM2.2.02.145.tgz 1986370 SHA256 98b7c4c07c485a462c6a86e1a5265757133ceea36289ead8a419af29ef39560b SHA512 84e28b3efc940837ea9da70fce620744aea0945ba29383b76ad7bcd4b5259b897c714162a8e8b7cfe26ae736a3ad2eca633a3e0df4d6280a32b28bd4cf472d27 WHIRLPOOL b8c6f4b737625547d4c2994d055f3334e2954f160d10840f1405b6a78f25fc17ba1d270f574408c151140e2afceb007cbfa1c146ed105bbdeca001a03368d549
|
||||
DIST LVM2.2.02.166.tgz 2148324 SHA256 e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94 SHA512 8bebe9b474f791b5edf5366b0bd24861fbbaf8a83afa2a9e2a8e3917e05e4ecbf6877f018be03ffb4e9b4c8832208264165b85182bf79a07661adf35128b4a21 WHIRLPOOL a4c2e0b2e8da85301b2518b35193304436715fdf45cbc7bc28fd6f7b88af15e611134d5a530d2311b23544aa67c3a7f13fd3780d4d46fc10854e624fb8b27870
|
||||
EBUILD lvm2-2.02.116-r1.ebuild 9247 SHA256 53f3dc802b283c28b88669fa4086e60cc08700a16c781b64a7dc14bc18b825f9 SHA512 d1274a15d39b795fd94e24ab32bb1bfb776b288aedcb45b8c3ac64f0bcee013c51d4a524c91479e7523d7b28afc68f32a911b9b7adcd1bc7844a31329904e547 WHIRLPOOL 7e9d4725e6be60405510d3c9326fb7fb615125b6063ed954bf2c8006579697324d3d63ff42b2e73f75f1da21bfe93bd9e6e8f2540b1b4e37720da267e5deeeec
|
||||
EBUILD lvm2-2.02.116-r2.ebuild 9386 SHA256 9cd89b3c0b0fc41f11a9b68fe879ae58d844a072cd4d52ab977d86b73454dbc9 SHA512 42b3583ca14a706cd13fd4ed79e4f1bf680b6d3312aa8b815be8ffe7b0ccc74107b8df0629ad1a353be354fac6815057ecb9f0dd742be8dabfa9ccc981e30f58 WHIRLPOOL ff2b65d3f6b93c2cb6ec58d25427f173cab94faef09ea5e37fdba50f664f989b3eaedc0009c0f70eed10017a06a575cb9a2f8f8a38366cc89dfa1aa050c04564
|
||||
EBUILD lvm2-2.02.116-r4.ebuild 9572 SHA256 285831c790f3f303eceb84cf212f49fcea9bc752494841fe83c9d0ddf5f3078a SHA512 763b64def4f7ce4b2d0ed01c7733b643460ff73c3b8f1ff2dfb79c1ec46b822e38c02be7c0d73c8d2ef5f3090526dd608c0a0df916d4bd0d5af0901669a985f7 WHIRLPOOL aff9a98e3f842bff2e0d82b35a36e204c89302d7c4b138e4fda984dfdf2008fa8b8cff2b099fe305eb15f020a0ea5a1cda36e02a68380bd9c594134af2279c31
|
||||
EBUILD lvm2-2.02.116-r5.ebuild 9797 SHA256 98b04c74e73051129eced2aeb9364038b15d68a9c45bbd0fc58ec738431a7865 SHA512 49b95949d45d7afaeb64012b771dc0bf7c16ff7b8d59cb8840b2d3df2875c1c1daf80e2918014bcde381e42220056cb9005e2f5587d0b35aca07ae4c4ac3d009 WHIRLPOOL d8a6b7e0e9d291e4d6bbbb953ed289f48d95c720f71e1ad043b7b09264816463186e773c2f3cda6a1e96cf0f2a18276598f6e7a88ccab1cab9894230bf4574d7
|
||||
EBUILD lvm2-2.02.116-r6.ebuild 9797 SHA256 f576343d566ac4d4f75a49e038b3d499964a8b02e52a77cb65fa3508aebc1c17 SHA512 614c3a457fd5d2964d9da4801c537a5b0e3860477a7403ba02c05648d145899572b41b42174c767224f8a08308937ff97db0143f963c9f9b17d7628eef60832f WHIRLPOOL 9cf753e652d2b7b2829dae576f0ace75bbffa663b01703342605d5f414d61dd91f9e3b59e3e12aad639ac7cfd234339542b4476167bca34633ca8f56b37c31ff
|
||||
EBUILD lvm2-2.02.116.ebuild 9206 SHA256 631a123e3bf1e7d5a0999c36c1bfadb5fd1e3bc12ca4975055da9aafd0aefb2e SHA512 b687bc4adbe48a19a26581596cec343cc0d99affd8d2d1b035a4fc4ddfa0fb5557315515c13adbac7daeee70156b3bd9a4586c97a7b34fc00f2a367c3e7b447d WHIRLPOOL aa19c2b4521d4d819c128f8d6a1d84fc03a294e13b36f4498ad68de83c30fbb74bb35252167e179ce9eab5a2983313d3e626f27d10d04b33179907a7104022f9
|
||||
EBUILD lvm2-2.02.136-r1.ebuild 9605 SHA256 df0cf9d448f859423ebb9ce73a0569cac6bb875d7412e690d49f46ec23656907 SHA512 d50d04bf8743983e600d3b2f86b2deec12154d528c7dafbf7091c9a07d0a93d9cb30dabe4b9ad74115c41a374eab1990578fd72324e562511fefcf3410b299ec WHIRLPOOL 8dd3603c622674498e0fa3e41570e490b73f9ce7557e1f44489c2641e368b3069309994151324de3ebec5f6691b97e50d1cb7eabd9170816c6e96f841a7a1b1f
|
||||
EBUILD lvm2-2.02.136-r2.ebuild 9645 SHA256 4bcd5eb09961a153b3277437a17c03fd529348b6d4c7ac14870995b97476724c SHA512 9f76ca5aa607fbc40e52ab77ca0bfe57cae2c54a32def22c9de7e5a4a4485cb875d6263ccb306cfb351d091df435228a2d311f520fc18aed753420065be8622b WHIRLPOOL 3523e0f03ef8d700ba25830fd91e07f9bf6f73c9fe5dec8c8190a9ee741905072ea08a92e802d67a5a7bb99d2cf4372e4e95da9a01048d02d9bdf8cd34ed698c
|
||||
EBUILD lvm2-2.02.136.ebuild 9387 SHA256 26d781bbb4a7935ef9147b64a87fcf9e7b798c0064baddeb2ebec7ea3815478d SHA512 59045f50c3c71af252eb3455a496764dad79d327e989bb57546f499fe3f00a83531f505100513f0a62187872e126c3ec53e2090a0697bb63f3557175319a7474 WHIRLPOOL 2c0a9aae781adca899ae7d18296403f5335e197fbd2aa6120ded0cfabe0886a2c7d534ba0ee41ff509eeebf69e7d1848e390fa36cf89726025cfb15da1b087d0
|
||||
EBUILD lvm2-2.02.139-r1.ebuild 9645 SHA256 b4bc754193a30400eb223a54ae17307f469bd8c5bebd7bc357a8c5d5a2397e6e SHA512 84e13facf26a8df7ff7cbb3bee6d23d9f97d7a178628c98dcfd0bb84d5e5081313786f98bfdd7332e9b29fe6324bdfac6efb77f00c2b078793e74a8a0b970db2 WHIRLPOOL 3bbfd6840dd9b181f8d2c3721613d215966987ec0a1f32201224dd5c43f19bd7720c5746c1cfc963edb4b75617884d53cff3c8c84effeea28565a2a926468aaf
|
||||
EBUILD lvm2-2.02.139.ebuild 9605 SHA256 665b11bbc20341672d8716f65a82def11692bea895167494b615b5a4e4bd926c SHA512 7d0367f75cc7fcb5639dca3e6eaac201392706a2bf0f548c2244c09f8106eabc1fad292fc56913d48a221c9c7cfa325376b3523f75f921e877dc4c3b624b947c WHIRLPOOL 75fe0242b8fc0fadd2cf70a7362ef552664494c5c6237dfbf8c119f3b32c8833ab664f476efc22d97b4ba4c7515f4fd8d9120bdeeba9d6e5a16de2a78cf8f893
|
||||
EBUILD lvm2-2.02.145-r1.ebuild 9495 SHA256 25d295e895b3396fc58c95045770733702fac845fc60c45ab9938ca589a006fe SHA512 ff2473dab88dab220b394c15f6ba401b6988c23f4d0dcc864527b428ef583e603c6984dcc58574ea3a25010ca055e7cef711c618f032623ee63edd922861fdbf WHIRLPOOL dbdb0b87ce4358ecf571d1cabbd45dda6c1ba111da1512480511d914f704b8bc01b3175a87e4f121111ce3fb267e4be4cff901e983b0433fc36aefe5f79477c8
|
||||
EBUILD lvm2-2.02.145-r2.ebuild 9585 SHA256 d8002d8e61b9c24a1ba8319c0fc04e3102d4cfee25565609f6f7564744cea81b SHA512 68bff23ebdfe920200679f4e8fbd4b8891e702b2d89c3a2c99f0ef4ab1b8a7092c0b896da02cf3b01f83b81e508acbc417d3b778ad7766d8a9a791d1aa053a4c WHIRLPOOL 388d8d8a97b354108a3430f85a2eb1822f500d832edff821e05d754db3d86a25e13356c6f0a7f815b213ca76f61fbf1de1175959fe5d23963865c65194cc7313
|
||||
EBUILD lvm2-2.02.145.ebuild 9633 SHA256 16c48e47ced662da0a09e575fb4e7dba6f15546bde7d45eaa6e347c6c96a7d6a SHA512 950229bcccf673055c61b7c84b40db9ac8220a0f5de5cb8e623596944fe521ffefa50240435a03fcaf52cb8b9dde326b68e84e1b74d31396c91655d554be914a WHIRLPOOL f98a30ef6536c62b4aad6e13b79a7f66fc91d6973a01a2a679fb65613499ff19030765ea8e9e60040c519a595bb5bd2885fbd8b1d905dcd1a0ca454afdfbfe76
|
||||
EBUILD lvm2-2.02.166-r2.ebuild 9718 SHA256 defadf6a374d968daba4b77507dbc70e3182066365c2a240abd636b6aa4cbeee SHA512 cd99d18c1e5009e9709cdfa5b0b1a1e4979bc8c397e929212af088edce25369a35d429054c3689cf9d2301166872df76f130aea0c83991734ed1a1f648f59c6c WHIRLPOOL d4a5dd482c6707ff7de0fb6658da3fb7d9cbe63c9f83b9822015247b617f8d7067dc65bb7ef2e86da600f9c25a218d356bb2304211fb5363d613fcfc5888715c
|
||||
EBUILD lvm2-2.02.166.ebuild 9604 SHA256 9b51a0dda77b9f2eb9a51b7fb8350de03979693436e081a0137f076d08ba272d SHA512 5a1340aeda463ed0abf23b7b9d87e2c2c8ee42306f78e0a3b739a2523fedabcdd5b635e4ba29ff5e81ff39ca60f698ff2d17522bc0f95bf0fcce6efb4e4c7d32 WHIRLPOOL 5cad1fdd4fdfcbacdec46a15829849634adb9140772f9aa67b1682ae5e1ecb7b1fd25476610cde0152c2c80be27c551e23a72c7c077891817a6348df125e53cf
|
||||
MISC ChangeLog 14543 SHA256 1f3302bd2e563ecfdb72829dacb3c4c92a55f65106b571640a6a6880b3a34250 SHA512 8e29c06d00fe8287aba2ce66a285640475dccd5e9606ad37c66028da93ade772350b15eb22cd4e41820dcca90268f0c3fe76474de0a724998b6db1a6510cc947 WHIRLPOOL 3ebeb9366061a2928970670085ba16cabb645a595117f610f57cf10c32061bf654f1a0e51c7f5e22d89e46e80d6c4ca1bd444f503df33eb8089b29dc5581b285
|
||||
MISC ChangeLog-2015 72475 SHA256 224bbc0870f81aa361a1d5e14ec0d6620e38ca885ea981f613b07bf96b69b5c5 SHA512 05bea0dd8353bc302e1cf70cafdff405d74dfcb291f8a145fc879e9a03ce41476dccdd7322dd5bf6c8c2ab6c6b615d29c2f96bccfcf179b4b043fbac6b949dab WHIRLPOOL 7c2e264238f32f892fbddd1e6712f94049a83d2bd66e90d921d4b353812a172ef3924bc2efa6e74e32877d69d52c9720c390ef501976fadc2064b3ea00ec18a7
|
||||
MISC metadata.xml 1397 SHA256 2b717cd8b25dab45bbf8e04e9d1ea312132ab7d969dbaabcf5ce3665da04dab1 SHA512 1ed97dbef323b6703097c20de99e9003c88663a887bcf87c9489baddfa180aa3d8645e4e60cd3eb3b9505603997ac3ab98a7ee96a813b77b9dc25862dd332d35 WHIRLPOOL f7d03ebb6752c774d7d0415a0cf1d936e9206e4a923cc9b670d593bbc412baa9a0c96f369fd8be1170642ca8d54ec5165cc1929b88e4267e73ec630ed6b82cde
|
||||
DIST LVM2.2.02.188.tgz 2421550 BLAKE2B bed90c8454cd4b20fdeec6dcbf5a9f97c9310671aea3b2252f8069cfa439fcb050f5ad95f928a7125a1734a4dc5ac985da99a4a570538e377a7205191a505476 SHA512 8c9db17c49dc8ebcab6c7f246ab85870a80658be811cf7f4d8f36abbebafa355b030bfc1e3bcbad73ccccb7fcd06d4a95ac547ca15d18d33715126da92703dca
|
||||
|
15
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
We keep this package in overlay, because we carry one extra patch for
|
||||
the unit generator. It was posted upstream and remains
|
||||
unacknowledged. We could try sending the patch to gentoo, so we can
|
||||
bring this package back to portage-stable.
|
||||
|
||||
The lvm2-activation(-early).service was triggered multiple times which
|
||||
if done too quickly leads to a failure like this:
|
||||
|
||||
systemd[1]: Finished Activation of LVM2 logical volumes.
|
||||
systemd[1]: lvm2-activation-early.service: Start request repeated too quickly.
|
||||
systemd[1]: lvm2-activation-early.service: Failed with result 'start-limit-hit'.
|
||||
|
||||
Set RemainAfterExit=yes as done for the other oneshot services to
|
||||
prevent the unit from running multiple times in a row and hitting the
|
||||
restart limit.
|
@ -1,9 +0,0 @@
|
||||
# CLVMD_CLUSTER_TIMEOUT -- amount of time to wait for cluster quorum.
|
||||
|
||||
CLVMD_CLUSTER_TIMEOUT=30
|
||||
|
||||
|
||||
# CLVMD_NODES_TIMEOUT -- amount of time to wait for the other nodes to
|
||||
# join the cluster.
|
||||
|
||||
CLVMD_NODES_TIMEOUT=60
|
@ -1,145 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
[ -x /usr/sbin/clvmd ] && CLVMD_BIN="/usr/sbin/clvmd" || CLVMD_BIN="/sbin/clvmd"
|
||||
|
||||
[ -z "$CLVMD_CLUSTER_TIMEOUT" ] && CLVMD_CLUSTER_TIMEOUT=30
|
||||
[ -n "$CLVMD_NODES_TIMEOUT" ] || CLVMD_NODES_TIMEOUT=60
|
||||
|
||||
VGCHANGE="/sbin/vgchange"
|
||||
VGSCAN="/sbin/vgscan"
|
||||
VGDISPLAY="/sbin/vgdisplay"
|
||||
CLVMD_PIDFILE="/var/run/clvmd.pid"
|
||||
|
||||
depend() {
|
||||
use net dns logger dmeventd
|
||||
want cman corosync openais
|
||||
}
|
||||
|
||||
load_modules() {
|
||||
local module modules
|
||||
modules=$1
|
||||
|
||||
for module in ${modules}; do
|
||||
ebegin "Loading ${module} kernel module"
|
||||
modprobe ${module}
|
||||
eend $? "Failed to load ${module} kernel module"
|
||||
done
|
||||
}
|
||||
|
||||
unload_modules() {
|
||||
local module modules
|
||||
modules=$1
|
||||
|
||||
for module in ${modules}; do
|
||||
ebegin "Unloading ${module} kernel module"
|
||||
modprobe -r ${module}
|
||||
eend $? "Failed to unload ${module} kernel module"
|
||||
done
|
||||
}
|
||||
|
||||
umount_gfs_filesystems() {
|
||||
local sig retry
|
||||
local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
|
||||
|
||||
if [ -n "${remaining}" ]
|
||||
then
|
||||
sig=
|
||||
retry=3
|
||||
while [ -n "${remaining}" -a "${retry}" -gt 0 ]
|
||||
do
|
||||
if [ "${retry}" -lt 3 ]
|
||||
then
|
||||
ebegin "Unmounting GFS filesystems (retry)"
|
||||
umount ${remaining} &>/dev/null
|
||||
eend $? "Failed to unmount GFS filesystems this retry"
|
||||
else
|
||||
ebegin "Unmounting GFS filesystems"
|
||||
umount ${remaining} &>/dev/null
|
||||
eend $? "Failed to unmount GFS filesystems"
|
||||
fi
|
||||
remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
|
||||
[ -z "${remaining}" ] && break
|
||||
/bin/fuser -k -m ${sig} ${remaining} &>/dev/null
|
||||
sleep 5
|
||||
retry=$((${retry} -1))
|
||||
sig=-9
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
start_volumes() {
|
||||
ebegin "Scanning LVM volumes"
|
||||
$VGSCAN > /dev/null 2>&1
|
||||
eend $?
|
||||
|
||||
ret=$?
|
||||
if [ "$ret" -eq 5 ]
|
||||
then
|
||||
einfo " Waiting for other nodes to join the cluster ($CLVMD_NODES_TIMEOUT seconds)"
|
||||
fi
|
||||
|
||||
clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
|
||||
for vg in $clustervgs; do
|
||||
ebegin " Activating Clustered VG: ${vg} "
|
||||
|
||||
wait=0
|
||||
while [ -n "$($VGCHANGE -a y ${vg} 2>&1 |grep "clvmd not running")" ]; do
|
||||
if [ $wait -lt $CLVMD_NODES_TIMEOUT ]; then
|
||||
sleep 3
|
||||
wait=$(($wait + 3))
|
||||
else
|
||||
eend 1
|
||||
fi
|
||||
done
|
||||
eend 0
|
||||
done
|
||||
}
|
||||
|
||||
stop_volumes() {
|
||||
# Deactivate only clustered volumes
|
||||
clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'`
|
||||
for vg in $clustervgs; do
|
||||
ebegin " Shutting Down Clustered VG: ${vg} "
|
||||
$VGCHANGE -anl ${vg} >/dev/null
|
||||
eend $?
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/{modules,devices})
|
||||
|
||||
if [ -z "${module}" ]; then
|
||||
load_modules "dm-mod"
|
||||
sleep 1s
|
||||
fi
|
||||
|
||||
ebegin "Starting clvmd ($CLVMD_CLUSTER_TIMEOUT seconds)"
|
||||
|
||||
start-stop-daemon --start --quiet --exec ${CLVMD_BIN} -- -T ${CLVMD_CLUSTER_TIMEOUT}
|
||||
eend $?
|
||||
|
||||
start_volumes
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
# umount GFS filesystems
|
||||
umount_gfs_filesystems
|
||||
|
||||
#stop_volumes
|
||||
|
||||
ebegin "Stopping clvmd"
|
||||
#start-stop-daemon --stop -s TERM --quiet --exec ${CLVMD_BIN} --name clvmd
|
||||
killall -TERM ${CLVMD_BIN} >/dev/null
|
||||
eend $?
|
||||
|
||||
#local module=$(awk '$1 == "dm_mod" { print $1 }' /proc/modules)
|
||||
|
||||
#if [[ "$?" -eq 0 && ! -z "${module}" ]]; then
|
||||
# unload_modules "dm-mod"
|
||||
#fi
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
|
21
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
vendored
Normal file
21
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/dmeventd.initd-2.02.184-r2
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command=/sbin/dmeventd
|
||||
command_args_foreground='-f'
|
||||
extra_started_commands=reload
|
||||
pidfile=/run/dmeventd.pid
|
||||
# Control idle exit behavior of daemon
|
||||
export DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:=-1}
|
||||
|
||||
depend() {
|
||||
# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
|
||||
# means dmeventd is NOT notified, as it cannot be safely running
|
||||
after lvm device-mapper
|
||||
}
|
||||
|
||||
reload() {
|
||||
# TODO: this is not supported under supervisors
|
||||
${command} -R
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
PIDFILE=/run/dmeventd.pid
|
||||
BIN=/sbin/dmeventd
|
||||
|
||||
depend() {
|
||||
# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
|
||||
# means dmeventd is NOT notified, as it cannot be safely running
|
||||
after lvm device-mapper
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting dmeventd"
|
||||
start-stop-daemon --start --exec $BIN --pidfile $PIDFILE
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping dmeventd"
|
||||
start-stop-daemon --stop --exec $BIN --pidfile $PIDFILE
|
||||
eend $?
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# This script is based on upstream file
|
||||
|
@ -1,5 +1,9 @@
|
||||
# If LVM is built with udev, you must ensure udev is running first!
|
||||
# Otherwise it will hang
|
||||
rc_need="udev"
|
||||
|
||||
# LVM should normally only be started after mdraid is available
|
||||
# this is because LVM physical volumes are very often MD devices.
|
||||
RC_AFTER="mdraid"
|
||||
rc_after="mdraid"
|
||||
|
||||
# vim: ft=gentoo-conf-d
|
@ -1,96 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
before checkfs fsck
|
||||
after modules device-mapper
|
||||
need lvmetad sysfs
|
||||
}
|
||||
|
||||
config='global { locking_dir = "/run/lock/lvm" }'
|
||||
|
||||
dm_in_proc() {
|
||||
local retval=0
|
||||
for x in devices misc ; do
|
||||
grep -qs 'device-mapper' /proc/${x}
|
||||
retval=$((${retval} + $?))
|
||||
done
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
start() {
|
||||
# LVM support for /usr, /home, /opt ....
|
||||
# This should be done *before* checking local
|
||||
# volumes, or they never get checked.
|
||||
|
||||
# NOTE: Add needed modules for LVM or RAID, etc
|
||||
# to /etc/modules.autoload if needed
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
if [ -z "${CDBOOT}" ] ; then
|
||||
if [ -e /proc/modules ] && ! dm_in_proc ; then
|
||||
modprobe dm-mod 2>/dev/null
|
||||
fi
|
||||
if [ -d /proc/lvm ] || dm_in_proc ; then
|
||||
ebegin "Setting up the Logical Volume Manager"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}pvscan\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgscan --mknodes\n"
|
||||
# And turn them on!
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed to setup the LVM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
# Stop LVM2
|
||||
if [ -x /sbin/vgs ] && \
|
||||
[ -x /sbin/vgchange ] && \
|
||||
[ -x /sbin/lvchange ] && \
|
||||
[ -f /etc/lvmtab -o -d /etc/lvm ] && \
|
||||
[ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
|
||||
then
|
||||
einfo "Shutting down the Logical Volume Manager"
|
||||
|
||||
|
||||
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
|
||||
|
||||
if [ "$VGS" ]
|
||||
then
|
||||
ebegin " Shutting Down LVs & VGs"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed (possibly some LVs still needed for /usr or root)"
|
||||
fi
|
||||
|
||||
einfo "Finished shutting down the Logical Volume Manager"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# vim:ts=4
|
@ -1,132 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
_get_lvm_path() {
|
||||
local lvm_path=
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
echo "${lvm_path}"
|
||||
}
|
||||
|
||||
_need_lvmetad()
|
||||
{
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global | grep -q 'use_lvmetad=1'
|
||||
}
|
||||
|
||||
depend() {
|
||||
before checkfs fsck
|
||||
after modules device-mapper
|
||||
# We may use lvmetad based on the configuration. If we added lvmetad
|
||||
# support while lvm2 is running then we aren't dependent on it. For the
|
||||
# more common case, if its disabled in the config we aren't dependent
|
||||
# on it.
|
||||
config /etc/lvm/lvm.conf
|
||||
local _need=
|
||||
if service_started; then
|
||||
_need=$(service_get_value need)
|
||||
else
|
||||
if _need_lvmetad; then
|
||||
_need="${_need} lvmetad"
|
||||
fi
|
||||
fi
|
||||
need sysfs ${_need}
|
||||
}
|
||||
|
||||
config='global { locking_dir = "/run/lock/lvm" }'
|
||||
|
||||
dm_in_proc() {
|
||||
local retval=0
|
||||
for x in devices misc ; do
|
||||
grep -qs 'device-mapper' /proc/${x}
|
||||
retval=$((${retval} + $?))
|
||||
done
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
start() {
|
||||
# LVM support for /usr, /home, /opt ....
|
||||
# This should be done *before* checking local
|
||||
# volumes, or they never get checked.
|
||||
|
||||
# NOTE: Add needed modules for LVM or RAID, etc
|
||||
# to /etc/modules.autoload if needed
|
||||
lvm_path="$(_get_lvm_path)"
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
if [ -z "${CDBOOT}" ] ; then
|
||||
if [ -e /proc/modules ] && ! dm_in_proc ; then
|
||||
modprobe dm-mod 2>/dev/null
|
||||
fi
|
||||
if [ -d /proc/lvm ] || dm_in_proc ; then
|
||||
ebegin "Setting up the Logical Volume Manager"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}pvscan\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgscan --mknodes\n"
|
||||
# And turn them on!
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed to setup the LVM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_post()
|
||||
{
|
||||
# Save if we needed lvmetad
|
||||
if _need_lvmetad; then
|
||||
service_set_value need lvmetad
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
# Stop LVM2
|
||||
if [ -x /sbin/vgs ] && \
|
||||
[ -x /sbin/vgchange ] && \
|
||||
[ -x /sbin/lvchange ] && \
|
||||
[ -f /etc/lvmtab -o -d /etc/lvm ] && \
|
||||
[ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
|
||||
then
|
||||
einfo "Shutting down the Logical Volume Manager"
|
||||
|
||||
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
|
||||
|
||||
if [ "$VGS" ]
|
||||
then
|
||||
ebegin " Shutting Down LVs & VGs"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed (possibly some LVs still needed for /usr or root)"
|
||||
fi
|
||||
|
||||
einfo "Finished shutting down the Logical Volume Manager"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# vim:ts=4
|
@ -1,132 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
_get_lvm_path() {
|
||||
local lvm_path=
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
echo "${lvm_path}"
|
||||
}
|
||||
|
||||
_need_lvmetad()
|
||||
{
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
|
||||
}
|
||||
|
||||
depend() {
|
||||
before checkfs fsck
|
||||
after modules device-mapper
|
||||
# We may use lvmetad based on the configuration. If we added lvmetad
|
||||
# support while lvm2 is running then we aren't dependent on it. For the
|
||||
# more common case, if its disabled in the config we aren't dependent
|
||||
# on it.
|
||||
config /etc/lvm/lvm.conf
|
||||
local _need=
|
||||
if service_started; then
|
||||
_need=$(service_get_value need)
|
||||
else
|
||||
if _need_lvmetad; then
|
||||
_need="${_need} lvmetad"
|
||||
fi
|
||||
fi
|
||||
need sysfs ${_need}
|
||||
}
|
||||
|
||||
config='global { locking_dir = "/run/lock/lvm" }'
|
||||
|
||||
dm_in_proc() {
|
||||
local retval=0
|
||||
for x in devices misc ; do
|
||||
grep -qs 'device-mapper' /proc/${x}
|
||||
retval=$((${retval} + $?))
|
||||
done
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
start() {
|
||||
# LVM support for /usr, /home, /opt ....
|
||||
# This should be done *before* checking local
|
||||
# volumes, or they never get checked.
|
||||
|
||||
# NOTE: Add needed modules for LVM or RAID, etc
|
||||
# to /etc/modules.autoload if needed
|
||||
lvm_path="$(_get_lvm_path)"
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
if [ -z "${CDBOOT}" ] ; then
|
||||
if [ -e /proc/modules ] && ! dm_in_proc ; then
|
||||
modprobe dm-mod 2>/dev/null
|
||||
fi
|
||||
if [ -d /proc/lvm ] || dm_in_proc ; then
|
||||
ebegin "Setting up the Logical Volume Manager"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}pvscan\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgscan --mknodes\n"
|
||||
# And turn them on!
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed to setup the LVM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_post()
|
||||
{
|
||||
# Save if we needed lvmetad
|
||||
if _need_lvmetad; then
|
||||
service_set_value need lvmetad
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
# Stop LVM2
|
||||
if [ -x /sbin/vgs ] && \
|
||||
[ -x /sbin/vgchange ] && \
|
||||
[ -x /sbin/lvchange ] && \
|
||||
[ -f /etc/lvmtab -o -d /etc/lvm ] && \
|
||||
[ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
|
||||
then
|
||||
einfo "Shutting down the Logical Volume Manager"
|
||||
|
||||
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
|
||||
|
||||
if [ "$VGS" ]
|
||||
then
|
||||
ebegin " Shutting Down LVs & VGs"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed (possibly some LVs still needed for /usr or root)"
|
||||
fi
|
||||
|
||||
einfo "Finished shutting down the Logical Volume Manager"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# vim:ts=4
|
@ -1,145 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
_get_lvm_path() {
|
||||
local lvm_path=
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
echo "${lvm_path}"
|
||||
}
|
||||
|
||||
_need_lvmetad()
|
||||
{
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
|
||||
}
|
||||
|
||||
_need_lvmlockd()
|
||||
{
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
|
||||
}
|
||||
depend() {
|
||||
before checkfs fsck
|
||||
after modules device-mapper
|
||||
# We may use lvmetad based on the configuration. If we added lvmetad
|
||||
# support while lvm2 is running then we aren't dependent on it. For the
|
||||
# more common case, if its disabled in the config we aren't dependent
|
||||
# on it.
|
||||
config /etc/lvm/lvm.conf
|
||||
local _need=
|
||||
if service_started; then
|
||||
_need=$(service_get_value need)
|
||||
else
|
||||
if _need_lvmetad; then
|
||||
_need="${_need} lvmetad"
|
||||
fi
|
||||
if _need_lvmlockd; then
|
||||
_need="${_need} lvmlockd"
|
||||
fi
|
||||
fi
|
||||
need sysfs ${_need}
|
||||
}
|
||||
|
||||
config='global { locking_dir = "/run/lock/lvm" }'
|
||||
|
||||
dm_in_proc() {
|
||||
local retval=0
|
||||
for x in devices misc ; do
|
||||
grep -qs 'device-mapper' /proc/${x}
|
||||
retval=$((${retval} + $?))
|
||||
done
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
start() {
|
||||
# LVM support for /usr, /home, /opt ....
|
||||
# This should be done *before* checking local
|
||||
# volumes, or they never get checked.
|
||||
|
||||
# NOTE: Add needed modules for LVM or RAID, etc
|
||||
# to /etc/modules.autoload if needed
|
||||
lvm_path="$(_get_lvm_path)"
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
if [ -z "${CDBOOT}" ] ; then
|
||||
if [ -e /proc/modules ] && ! dm_in_proc ; then
|
||||
modprobe dm-mod 2>/dev/null
|
||||
fi
|
||||
if [ -d /proc/lvm ] || dm_in_proc ; then
|
||||
ebegin "Setting up the Logical Volume Manager"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}pvscan\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgscan --mknodes\n"
|
||||
# And turn them on!
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
|
||||
if _need_lvmlockd; then
|
||||
# Start lockd VGs as required
|
||||
lvm_commands="${lvm_commands}vgchange --lock-start --lock-opt auto\n"
|
||||
fi
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed to setup the LVM"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_post()
|
||||
{
|
||||
# Save if we needed lvmetad
|
||||
if _need_lvmetad; then
|
||||
service_set_value need lvmetad
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "$lvm_path" ] && break
|
||||
done
|
||||
if [ ! -x "$lvm_path" ]; then
|
||||
eerror "Cannot find lvm binary in /sbin or /bin!"
|
||||
return 1
|
||||
fi
|
||||
# Stop LVM2
|
||||
if [ -x /sbin/vgs ] && \
|
||||
[ -x /sbin/vgchange ] && \
|
||||
[ -x /sbin/lvchange ] && \
|
||||
[ -f /etc/lvmtab -o -d /etc/lvm ] && \
|
||||
[ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
|
||||
then
|
||||
einfo "Shutting down the Logical Volume Manager"
|
||||
|
||||
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
|
||||
|
||||
if [ "$VGS" ]
|
||||
then
|
||||
ebegin " Shutting Down LVs & VGs"
|
||||
#still echo stderr for debugging
|
||||
lvm_commands="#! ${lvm_path} --config '${config}'\n"
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
|
||||
# Now make the nodes
|
||||
lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
|
||||
# Order of this is important, have to work around dash and LVM readline
|
||||
printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
|
||||
eend $? "Failed (possibly some LVs still needed for /usr or root)"
|
||||
fi
|
||||
|
||||
einfo "Finished shutting down the Logical Volume Manager"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# vim:ts=4
|
173
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm.rc-2.02.187
vendored
Normal file
173
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm.rc-2.02.187
vendored
Normal file
@ -0,0 +1,173 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
_get_lvm_path() {
|
||||
local lvm_path=
|
||||
for lvm_path in /bin/lvm /sbin/lvm ; do
|
||||
[ -x "${lvm_path}" ] && break
|
||||
done
|
||||
echo "${lvm_path}"
|
||||
}
|
||||
|
||||
_use_lvmetad() {
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'
|
||||
}
|
||||
|
||||
_use_lvmlockd() {
|
||||
local lvm_path="$(_get_lvm_path)"
|
||||
[ ! -x "${lvm_path}" ] && return 1
|
||||
${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'
|
||||
}
|
||||
|
||||
depend() {
|
||||
before checkfs fsck
|
||||
after modules device-mapper
|
||||
# We may want lvmetad based on the configuration. If we added lvmetad
|
||||
# support while lvm2 is running then we aren't dependent on it. For the
|
||||
# more common case, if its disabled in the config we aren't dependent
|
||||
# on it.
|
||||
config /etc/lvm/lvm.conf
|
||||
local _want=
|
||||
|
||||
if service_started ; then
|
||||
_want=$(service_get_value want)
|
||||
else
|
||||
if _use_lvmetad ; then
|
||||
_want="${_want} lvmetad"
|
||||
fi
|
||||
|
||||
if _use_lvmlockd ; then
|
||||
_want="${_want} lvmlockd"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure you review /etc/conf.d/lvm as well!
|
||||
# Depending on your system, it might also introduce udev & mdraid
|
||||
need sysfs
|
||||
|
||||
if [ -n "${_want}" ] ; then
|
||||
want ${_want}
|
||||
fi
|
||||
}
|
||||
|
||||
config='global { locking_dir = "/run/lock/lvm" }'
|
||||
|
||||
dm_in_proc() {
|
||||
local retval=0
|
||||
for x in devices misc ; do
|
||||
grep -qs 'device-mapper' /proc/${x}
|
||||
retval=$((${retval} + $?))
|
||||
done
|
||||
return ${retval}
|
||||
}
|
||||
|
||||
start() {
|
||||
# LVM support for /usr, /home, /opt ....
|
||||
# This should be done *before* checking local
|
||||
# volumes, or they never get checked.
|
||||
|
||||
# NOTE: Add needed modules for LVM or RAID, etc
|
||||
# to /etc/modules.autoload if needed
|
||||
|
||||
lvm_path="$(_get_lvm_path)"
|
||||
if [ -z "${lvm_path}" ] ; then
|
||||
eerror "Failed to find lvm binary in /bin or /sbin!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${CDBOOT}" ] ; then
|
||||
if [ -e /proc/modules ] && ! dm_in_proc ; then
|
||||
ebegin "Trying to load dm-mod module"
|
||||
modprobe dm-mod 2>/dev/null
|
||||
eend $?
|
||||
fi
|
||||
|
||||
if [ -d /proc/lvm ] || dm_in_proc ; then
|
||||
local has_errors=0 verbose_command
|
||||
|
||||
yesno "${rc_verbose}" && verbose_command=" -v"
|
||||
|
||||
ebegin "Starting the Logical Volume Manager"
|
||||
|
||||
if _use_lvmetad ; then
|
||||
# Extra PV find pass because some devices might not have been available until very recently
|
||||
${lvm_path} pvscan${verbose_command} --config "${config}" --cache
|
||||
[ $? -ne 0 ] && has_errors=1
|
||||
fi
|
||||
|
||||
# Now make the nodes
|
||||
${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes
|
||||
[ $? -ne 0 ] && has_errors=1
|
||||
|
||||
# Enable all VGs
|
||||
${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y
|
||||
[ $? -ne 0 ] && has_errors=1
|
||||
|
||||
if _use_lvmlockd ; then
|
||||
# Start lockd VGs as required
|
||||
${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto
|
||||
[ $? -ne 0 ] && has_errors=1
|
||||
fi
|
||||
|
||||
eend ${has_errors} "Failed to start the Logical Volume Manager"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_post() {
|
||||
local _want=
|
||||
if _use_lvmetad ; then
|
||||
_want="${_want} lvmetad"
|
||||
fi
|
||||
|
||||
if _use_lvmlockd ; then
|
||||
_want="${_want} lvmlockd"
|
||||
fi
|
||||
|
||||
service_set_value want "${_want}"
|
||||
}
|
||||
|
||||
stop() {
|
||||
lvm_path="$(_get_lvm_path)"
|
||||
if [ -z "${lvm_path}" ] ; then
|
||||
eerror "Failed to find lvm binary in /bin or /sbin!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Stop LVM2
|
||||
if [ -f /etc/lvmtab -o -d /etc/lvm ] \
|
||||
&& [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ]
|
||||
then
|
||||
local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
|
||||
if [ -z "${VGS}" ] ; then
|
||||
# nothing to do for us
|
||||
return 0
|
||||
fi
|
||||
|
||||
local has_errors=0 verbose_command eend_cmd="eend"
|
||||
|
||||
yesno "${rc_verbose}" && verbose_command=" -v"
|
||||
|
||||
local msg="Failed to stop Logical Volume Manager"
|
||||
if [ "${RC_RUNLEVEL}" = shutdown ] ; then
|
||||
# failures on shutdown are non-fatal
|
||||
eend_cmd="ewend"
|
||||
msg="${msg} (possibly some LVs still needed for /usr or root)"
|
||||
fi
|
||||
|
||||
ebegin "Stopping the Logical Volume Manager"
|
||||
|
||||
${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n
|
||||
[ $? -ne 0 ] && has_errors=1
|
||||
|
||||
${eend_cmd} ${has_errors} "${msg}"
|
||||
fi
|
||||
|
||||
# at this point make sure we always exit without indicating an error
|
||||
return 0
|
||||
}
|
||||
|
||||
# vim:ts=4
|
@ -1,50 +0,0 @@
|
||||
Maintainer note: Forward ported without editing from lvm2-2.02.99-example.conf.in.patch to apply cleanly.
|
||||
|
||||
--- conf/example.conf.in
|
||||
+++ conf/example.conf.in
|
||||
@@ -105,6 +105,10 @@
|
||||
# By default we accept every block device:
|
||||
# filter = [ "a/.*/" ]
|
||||
|
||||
+ # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel
|
||||
+ # noise when you probed while not available.
|
||||
+ filter = [ "r|/dev/nbd.*|", "a/.*/" ]
|
||||
+
|
||||
# Exclude the cdrom drive
|
||||
# filter = [ "r|/dev/cdrom|" ]
|
||||
|
||||
@@ -522,7 +526,8 @@
|
||||
# e.g. vgscan.lvm1 and they will stop working after you start using
|
||||
# the new lvm2 on-disk metadata format.
|
||||
# The default value is set when the tools are built.
|
||||
- # fallback_to_lvm1 = 0
|
||||
+ # Gentoo: the LVM tools are a seperate package.
|
||||
+ fallback_to_lvm1 = 0
|
||||
|
||||
# The default metadata format that commands should use - "lvm1" or "lvm2".
|
||||
# The command line override is -M1 or -M2.
|
||||
@@ -1182,12 +1187,13 @@
|
||||
|
||||
# Metadata settings
|
||||
#
|
||||
-# metadata {
|
||||
+metadata {
|
||||
# Default number of copies of metadata to hold on each PV. 0, 1 or 2.
|
||||
# You might want to override it from the command line with 0
|
||||
# when running pvcreate on new PVs which are to be added to large VGs.
|
||||
|
||||
- # pvmetadatacopies = 1
|
||||
+ # Gentoo: enable for data safety, but PV resize is then disabled.
|
||||
+ # pvmetadatacopies = 2
|
||||
|
||||
# Default number of copies of metadata to maintain for each VG.
|
||||
# If set to a non-zero value, LVM automatically chooses which of
|
||||
@@ -1222,7 +1228,7 @@
|
||||
# the supplied toolset to make changes (e.g. vgcfgrestore).
|
||||
|
||||
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
|
||||
-#}
|
||||
+}
|
||||
|
||||
# Event daemon
|
||||
#
|
@ -1,104 +0,0 @@
|
||||
Maintainer note: Forward ported without editing from lvm2-2.02.107-static-pkgconfig-libs.patch to apply cleanly.
|
||||
|
||||
--- configure.in
|
||||
+++ configure.in
|
||||
@@ -1067,6 +1067,7 @@
|
||||
fi])
|
||||
if test "$BLKID_WIPING" = yes; then
|
||||
BLKID_PC="blkid"
|
||||
+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
|
||||
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
|
||||
fi
|
||||
fi
|
||||
@@ -1092,6 +1093,7 @@
|
||||
if test "$UDEV_SYNC" = yes; then
|
||||
pkg_config_init
|
||||
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
|
||||
+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
|
||||
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
|
||||
fi
|
||||
|
||||
@@ -1312,19 +1314,32 @@
|
||||
if test "$SELINUX" = yes; then
|
||||
AC_CHECK_LIB([sepol], [sepol_check_context], [
|
||||
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
|
||||
- SELINUX_LIBS="-lsepol"])
|
||||
+ SEPOL_LIBS="-lsepol"])
|
||||
+
|
||||
+ dnl -- init pkgconfig if required
|
||||
+ if test x$PKGCONFIG_INIT != x1; then
|
||||
+ pkg_config_init
|
||||
+ fi
|
||||
+ PKG_CHECK_MODULES(SELINUX, libselinux, [
|
||||
+ SELINUX_PC="libselinux"
|
||||
+ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
|
||||
+ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
|
||||
+ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
|
||||
+ ],[
|
||||
+ dnl -- old non-pkgconfig method, is buggy with static builds
|
||||
|
||||
AC_CHECK_LIB([selinux], [is_selinux_enabled], [
|
||||
AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
|
||||
AC_CHECK_HEADERS([selinux/label.h])
|
||||
AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
|
||||
- SELINUX_LIBS="-lselinux $SELINUX_LIBS"
|
||||
+ SELINUX_LIBS="-lselinux $SEPOL_LIBS"
|
||||
SELINUX_PC="libselinux"
|
||||
HAVE_SELINUX=yes ], [
|
||||
AC_MSG_WARN(Disabling selinux)
|
||||
SELINUX_LIBS=
|
||||
SELINUX_PC=
|
||||
HAVE_SELINUX=no ])
|
||||
+ ])
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
@@ -1626,6 +1641,7 @@
|
||||
################################################################################
|
||||
AC_SUBST(APPLIB)
|
||||
AC_SUBST(AWK)
|
||||
+AC_SUBST(BLKID_STATIC_LIBS)
|
||||
AC_SUBST(BLKID_PC)
|
||||
AC_SUBST(BLKID_WIPING)
|
||||
AC_SUBST(BUILD_CMIRRORD)
|
||||
@@ -1721,6 +1737,7 @@
|
||||
AC_SUBST(SALCK_CFLAGS)
|
||||
AC_SUBST(SALCK_LIBS)
|
||||
AC_SUBST(SELINUX_LIBS)
|
||||
+AC_SUBST(SELINUX_STATIC_LIBS)
|
||||
AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
@@ -1735,6 +1752,7 @@
|
||||
AC_SUBST(CACHE_DUMP_CMD)
|
||||
AC_SUBST(CACHE_REPAIR_CMD)
|
||||
AC_SUBST(CACHE_RESTORE_CMD)
|
||||
+AC_SUBST(UDEV_STATIC_LIBS)
|
||||
AC_SUBST(UDEV_PC)
|
||||
AC_SUBST(UDEV_RULES)
|
||||
AC_SUBST(UDEV_SYNC)
|
||||
--- make.tmpl.in
|
||||
+++ make.tmpl.in
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
LIBS = @LIBS@
|
||||
# Extra libraries always linked with static binaries
|
||||
-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
|
||||
+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
|
||||
DEFS += @DEFS@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS += @CFLAGS@
|
||||
@@ -57,10 +57,13 @@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
READLINE_LIBS = @READLINE_LIBS@
|
||||
SELINUX_LIBS = @SELINUX_LIBS@
|
||||
+SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
|
||||
UDEV_CFLAGS = @UDEV_CFLAGS@
|
||||
UDEV_LIBS = @UDEV_LIBS@
|
||||
+UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
|
||||
BLKID_CFLAGS = @BLKID_CFLAGS@
|
||||
BLKID_LIBS = @BLKID_LIBS@
|
||||
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
|
||||
TESTING = @TESTING@
|
||||
|
||||
# Setup directory variables
|
@ -1,59 +0,0 @@
|
||||
--- LVM2.2.02.129/configure.in
|
||||
+++ LVM2.2.02.129/configure.in
|
||||
@@ -31,6 +31,7 @@
|
||||
linux*)
|
||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||
ELDFLAGS="-Wl,--export-dynamic"
|
||||
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@@ -2008,6 +2009,7 @@
|
||||
AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
+AC_SUBST(STATIC_LDFLAGS)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(TESTING)
|
||||
AC_SUBST(TESTSUITE_DATA)
|
||||
--- LVM2.2.02.129/daemons/dmeventd/Makefile.in
|
||||
+++ LVM2.2.02.129/daemons/dmeventd/Makefile.in
|
||||
@@ -66,7 +66,7 @@
|
||||
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
|
||||
|
||||
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
--- LVM2.2.02.129/make.tmpl.in
|
||||
+++ LVM2.2.02.129/make.tmpl.in
|
||||
@@ -48,6 +48,7 @@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||
LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
|
||||
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||
CLDFLAGS += @CLDFLAGS@
|
||||
ELDFLAGS += @ELDFLAGS@
|
||||
LDDEPS += @LDDEPS@
|
||||
--- LVM2.2.02.129/tools/Makefile.in
|
||||
+++ LVM2.2.02.129/tools/Makefile.in
|
||||
@@ -129,7 +129,7 @@
|
||||
-o $@ dmsetup.o -ldevmapper $(LIBS)
|
||||
|
||||
dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
-o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
all: device-mapper
|
||||
@@ -146,7 +146,7 @@
|
||||
endif
|
||||
|
||||
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
$(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
@ -1,32 +0,0 @@
|
||||
Make sure that libdm usage always brings in pthread libraries, both in
|
||||
pkgconfig and during manual build.
|
||||
|
||||
--- LVM2.2.02.130/libdm/libdevmapper.pc.in
|
||||
+++ LVM2.2.02.130/libdm/libdevmapper.pc.in
|
||||
@@ -9,4 +9,4 @@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -ldevmapper
|
||||
Requires.private: @SELINUX_PC@ @UDEV_PC@
|
||||
-Libs.private: -lm @RT_LIB@
|
||||
+Libs.private: -lm @RT_LIB@ @PTHREAD_LIBS@
|
||||
--- LVM2.2.02.130/tools/Makefile.in
|
||||
+++ LVM2.2.02.130/tools/Makefile.in
|
||||
@@ -90,6 +90,7 @@
|
||||
INSTALL_LVM_TARGETS += install_tools_static
|
||||
INSTALL_DMSETUP_TARGETS += install_dmsetup_static
|
||||
INSTALL_CMDLIB_TARGETS += install_cmdlib_static
|
||||
+ STATIC_LIBS += @PTHREAD_LIBS@
|
||||
endif
|
||||
|
||||
LVMLIBS = $(LVMINTERNAL_LIBS)
|
||||
@@ -120,6 +121,10 @@
|
||||
|
||||
include $(top_builddir)/make.tmpl
|
||||
|
||||
+ifeq ("@STATIC_LINK@", "yes")
|
||||
+ STATIC_LIBS += @PTHREAD_LIBS@
|
||||
+endif
|
||||
+
|
||||
device-mapper: $(TARGETS_DM)
|
||||
|
||||
CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
|
@ -1,63 +0,0 @@
|
||||
diff -ur LVM2.2.02.139_O/configure.in LVM2.2.02.139/configure.in
|
||||
--- LVM2.2.02.139_O/configure.in 2016-01-19 12:54:33.155187005 +0000
|
||||
+++ LVM2.2.02.139/configure.in 2016-01-19 12:56:39.487181372 +0000
|
||||
@@ -31,6 +31,7 @@
|
||||
linux*)
|
||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||
ELDFLAGS="-Wl,--export-dynamic"
|
||||
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@@ -2009,6 +2010,7 @@
|
||||
AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
+AC_SUBST(STATIC_LDFLAGS)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(TESTING)
|
||||
AC_SUBST(TESTSUITE_DATA)
|
||||
diff -ur LVM2.2.02.139_O/daemons/dmeventd/Makefile.in LVM2.2.02.139/daemons/dmeventd/Makefile.in
|
||||
--- LVM2.2.02.139_O/daemons/dmeventd/Makefile.in 2016-01-19 12:54:33.278186999 +0000
|
||||
+++ LVM2.2.02.139/daemons/dmeventd/Makefile.in 2016-01-19 12:57:44.277178484 +0000
|
||||
@@ -67,7 +67,7 @@
|
||||
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
|
||||
|
||||
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
diff -ur LVM2.2.02.139_O/make.tmpl.in LVM2.2.02.139/make.tmpl.in
|
||||
--- LVM2.2.02.139_O/make.tmpl.in 2016-01-19 12:54:33.529186988 +0000
|
||||
+++ LVM2.2.02.139/make.tmpl.in 2016-01-19 12:58:31.514176378 +0000
|
||||
@@ -49,6 +49,7 @@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||
LDFLAGS ?= @COPTIMISE_FLAG@ @LDFLAGS@
|
||||
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||
CLDFLAGS += @CLDFLAGS@
|
||||
ELDFLAGS += @ELDFLAGS@
|
||||
LDDEPS += @LDDEPS@
|
||||
diff -ur LVM2.2.02.139_O/tools/Makefile.in LVM2.2.02.139/tools/Makefile.in
|
||||
--- LVM2.2.02.139_O/tools/Makefile.in 2016-01-08 18:51:21.000000000 +0000
|
||||
+++ LVM2.2.02.139/tools/Makefile.in 2016-01-19 13:00:08.349172060 +0000
|
||||
@@ -129,7 +129,7 @@
|
||||
-o $@ dmsetup.o -ldevmapper $(LIBS)
|
||||
|
||||
dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
-o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
all: device-mapper
|
||||
@@ -146,7 +146,7 @@
|
||||
endif
|
||||
|
||||
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
$(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
@ -1,127 +0,0 @@
|
||||
https://bugs.gentoo.org/580062
|
||||
|
||||
From 2a1d0fa8ea765604cd8274aac5aa7876f1c145c9 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Tue, 19 Apr 2016 23:53:22 -0400
|
||||
Subject: [PATCH] convert major/minor/makedev handling
|
||||
|
||||
Most of the files in here use MAJOR/MINOR/MKDEV macros, but a few
|
||||
missed it. Update the defines in those files to match them.
|
||||
---
|
||||
daemons/cmirrord/functions.c | 16 ++++++++++++----
|
||||
daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 12 ++++++++++--
|
||||
lib/filters/filter-sysfs.c | 6 ++++--
|
||||
3 files changed, 26 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
|
||||
index e9d3c09..5b3cb38 100644
|
||||
--- a/daemons/cmirrord/functions.c
|
||||
+++ b/daemons/cmirrord/functions.c
|
||||
@@ -20,6 +20,14 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifdef __linux__
|
||||
+# include "kdev_t.h"
|
||||
+#else
|
||||
+# define MAJOR(x) major((x))
|
||||
+# define MINOR(x) minor((x))
|
||||
+# define MKDEV(x,y) makedev((x),(y))
|
||||
+#endif
|
||||
+
|
||||
#define BYTE_SHIFT 3
|
||||
|
||||
/*
|
||||
@@ -333,8 +341,8 @@ static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_pat
|
||||
continue;
|
||||
}
|
||||
if (S_ISBLK(statbuf.st_mode) &&
|
||||
- (major(statbuf.st_rdev) == major) &&
|
||||
- (minor(statbuf.st_rdev) == minor)) {
|
||||
+ (MAJOR(statbuf.st_rdev) == major) &&
|
||||
+ (MINOR(statbuf.st_rdev) == minor)) {
|
||||
LOG_DBG(" %s: YES", dep->d_name);
|
||||
if (closedir(dp))
|
||||
LOG_DBG("Unable to closedir /dev/mapper %s",
|
||||
@@ -1451,7 +1459,7 @@ static int disk_status_info(struct log_c *lc, struct dm_ulog_request *rq)
|
||||
}
|
||||
|
||||
r = sprintf(data, "3 clustered-disk %d:%d %c",
|
||||
- major(statbuf.st_rdev), minor(statbuf.st_rdev),
|
||||
+ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
|
||||
(lc->log_dev_failed) ? 'D' : 'A');
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -1514,7 +1522,7 @@ static int disk_status_table(struct log_c *lc, struct dm_ulog_request *rq)
|
||||
}
|
||||
|
||||
r = sprintf(data, "clustered-disk %d:%d %u %s%s ",
|
||||
- major(statbuf.st_rdev), minor(statbuf.st_rdev),
|
||||
+ MAJOR(statbuf.st_rdev), MINOR(statbuf.st_rdev),
|
||||
lc->region_size,
|
||||
(lc->sync == DEFAULTSYNC) ? "" :
|
||||
(lc->sync == NOSYNC) ? "nosync " : "sync ",
|
||||
diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
|
||||
index 7b060ed..4098203 100644
|
||||
--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
|
||||
+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
|
||||
@@ -20,6 +20,14 @@
|
||||
#include <stdarg.h>
|
||||
#include <pthread.h>
|
||||
|
||||
+#ifdef __linux__
|
||||
+# include "kdev_t.h"
|
||||
+#else
|
||||
+# define MAJOR(x) major((x))
|
||||
+# define MINOR(x) minor((x))
|
||||
+# define MKDEV(x,y) makedev((x),(y))
|
||||
+#endif
|
||||
+
|
||||
/* First warning when snapshot is 80% full. */
|
||||
#define WARNING_THRESH (DM_PERCENT_1 * 80)
|
||||
/* Run a check every 5%. */
|
||||
@@ -148,8 +156,8 @@ static void _umount(const char *device, int major, int minor)
|
||||
continue; /* can't stat, skip this one */
|
||||
|
||||
if (S_ISBLK(st.st_mode) &&
|
||||
- major(st.st_rdev) == major &&
|
||||
- minor(st.st_rdev) == minor) {
|
||||
+ MAJOR(st.st_rdev) == major &&
|
||||
+ MINOR(st.st_rdev) == minor) {
|
||||
log_error("Unmounting invalid snapshot %s from %s.", device, words[1]);
|
||||
if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL))
|
||||
log_error("Failed to umount snapshot %s from %s: %s.",
|
||||
diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c
|
||||
index 3115f86..5f76e8b 100644
|
||||
--- a/lib/filters/filter-sysfs.c
|
||||
+++ b/lib/filters/filter-sysfs.c
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
+#include "kdev_t.h"
|
||||
+
|
||||
static int _locate_sysfs_blocks(const char *sysfs_dir, char *path, size_t len,
|
||||
unsigned *sysfs_depth)
|
||||
{
|
||||
@@ -120,7 +122,7 @@ static struct dev_set *_dev_set_create(struct dm_pool *mem,
|
||||
|
||||
static unsigned _hash_dev(dev_t dev)
|
||||
{
|
||||
- return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
|
||||
+ return (MAJOR(dev) ^ MINOR(dev)) & (SET_BUCKETS - 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -171,7 +173,7 @@ static int _parse_dev(const char *file, FILE *fp, dev_t *result)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- *result = makedev(major, minor);
|
||||
+ *result = MKDEV(major, minor);
|
||||
return 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ur LVM2.2.02.145/udev/11-dm-lvm.rules.in LVM2.2.02.145.new/udev/11-dm-lvm.rules.in
|
||||
--- LVM2.2.02.145/udev/11-dm-lvm.rules.in 2016-03-04 19:03:30.000000000 +0100
|
||||
+++ LVM2.2.02.145.new/udev/11-dm-lvm.rules.in 2020-08-25 12:01:32.235684488 +0200
|
||||
@@ -37,8 +37,6 @@
|
||||
|
||||
ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||
|
||||
-OPTIONS+="event_timeout=180"
|
||||
-
|
||||
# Do not create symlinks for inappropriate subdevices.
|
||||
ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
|
||||
ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
|
@ -0,0 +1,12 @@
|
||||
--- a/lib/device/dev-io.c
|
||||
+++ b/lib/device/dev-io.c
|
||||
@@ -505,7 +505,9 @@
|
||||
dev->flags |= DEV_NOT_O_NOATIME;
|
||||
if ((dev->fd = open(name, flags, 0777)) >= 0) {
|
||||
log_debug_devs("%s: Not using O_NOATIME", name);
|
||||
+#ifdef O_DIRECT_SUPPORT
|
||||
goto opened;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
#endif
|
13
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
vendored
Normal file
13
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.171-static-libm.patch
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/make.tmpl.in b/make.tmpl.in
|
||||
index a40eaaa15..7eea943aa 100644
|
||||
--- a/make.tmpl.in
|
||||
+++ b/make.tmpl.in
|
||||
@@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile
|
||||
|
||||
LIBS = @LIBS@
|
||||
# Extra libraries always linked with static binaries
|
||||
-STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
|
||||
+STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS)
|
||||
DEFS += @DEFS@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
@ -1,16 +1,21 @@
|
||||
Make sure that libdm usage always brings in pthread libraries, both in
|
||||
pkgconfig and during manual build.
|
||||
|
||||
--- tools/Makefile.in
|
||||
+++ tools/Makefile.in
|
||||
@@ -87,6 +87,7 @@
|
||||
--- LVM2.2.02.176/libdm/libdevmapper.pc.in
|
||||
+++ LVM2.2.02.176/libdm/libdevmapper.pc.in
|
||||
@@ -9,4 +9,4 @@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -ldevmapper
|
||||
Requires.private: @SELINUX_PC@ @UDEV_PC@
|
||||
-Libs.private: -lm @RT_LIBS@
|
||||
+Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@
|
||||
--- LVM2.2.02.176/tools/Makefile.in
|
||||
+++ LVM2.2.02.176/tools/Makefile.in
|
||||
@@ -93,6 +93,7 @@
|
||||
INSTALL_LVM_TARGETS += install_tools_static
|
||||
INSTALL_DMSETUP_TARGETS += install_dmsetup_static
|
||||
INSTALL_CMDLIB_TARGETS += install_cmdlib_static
|
||||
+ STATIC_LIBS += @PTHREAD_LIBS@
|
||||
endif
|
||||
|
||||
LVMLIBS = $(LVMINTERNAL_LIBS)
|
||||
LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper
|
||||
@@ -118,6 +119,10 @@
|
||||
|
||||
include $(top_builddir)/make.tmpl
|
||||
@ -22,11 +27,3 @@ pkgconfig and during manual build.
|
||||
device-mapper: $(TARGETS_DM)
|
||||
|
||||
CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
|
||||
--- libdm/libdevmapper.pc.in
|
||||
+++ libdm/libdevmapper.pc.in
|
||||
@@ -8,4 +8,5 @@
|
||||
Version: @DM_LIB_PATCHLEVEL@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -ldevmapper
|
||||
+Libs.private: -L${libdir} @PTHREAD_LIBS@
|
||||
Requires.private: @SELINUX_PC@ @UDEV_PC@
|
15
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
vendored
Normal file
15
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.178-asneeded.patch
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
http://bugs.gentoo.org/330255
|
||||
|
||||
liblvm2app.so: undefined reference to `floor'
|
||||
|
||||
--- LVM2.2.02.178/liblvm/Makefile.in
|
||||
+++ LVM2.2.02.178/liblvm/Makefile.in
|
||||
@@ -43,7 +43,7 @@
|
||||
include $(top_builddir)/make.tmpl
|
||||
|
||||
LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd
|
||||
-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
|
||||
+LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm
|
||||
|
||||
.PHONY: install_dynamic install_static install_include install_pkgconfig
|
||||
|
@ -0,0 +1,59 @@
|
||||
--- LVM2.2.02.178/configure.ac
|
||||
+++ LVM2.2.02.178/configure.ac
|
||||
@@ -33,6 +33,7 @@
|
||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||
# equivalent to -rdynamic
|
||||
ELDFLAGS="-Wl,--export-dynamic"
|
||||
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@@ -2042,6 +2043,7 @@
|
||||
AC_SUBST(SYSTEMD_LIBS)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
+AC_SUBST(STATIC_LDFLAGS)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(TESTSUITE_DATA)
|
||||
AC_SUBST(THIN)
|
||||
--- LVM2.2.02.178/daemons/dmeventd/Makefile.in
|
||||
+++ LVM2.2.02.178/daemons/dmeventd/Makefile.in
|
||||
@@ -64,7 +64,7 @@
|
||||
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS)
|
||||
|
||||
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
|
||||
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
--- LVM2.2.02.178/make.tmpl.in
|
||||
+++ LVM2.2.02.178/make.tmpl.in
|
||||
@@ -64,6 +64,7 @@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||
LDFLAGS ?= @LDFLAGS@
|
||||
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||
CLDFLAGS += @CLDFLAGS@
|
||||
ELDFLAGS += @ELDFLAGS@
|
||||
LDDEPS += @LDDEPS@
|
||||
--- LVM2.2.02.178/tools/Makefile.in
|
||||
+++ LVM2.2.02.178/tools/Makefile.in
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
|
||||
@echo " [CC] $@"
|
||||
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
-o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
all: device-mapper
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
|
||||
@echo " [CC] $@"
|
||||
- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
$(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
@ -1,7 +1,5 @@
|
||||
Maintainer note: Forward ported without editing from lvm2-2.02.108-example.conf.in.patch to apply cleanly.
|
||||
|
||||
--- LVM2.2.02.129/conf/example.conf.in
|
||||
+++ LVM2.2.02.129/conf/example.conf.in
|
||||
--- LVM2.2.02.178/conf/example.conf.in
|
||||
+++ LVM2.2.02.178/conf/example.conf.in
|
||||
@@ -128,6 +128,9 @@
|
||||
# Example
|
||||
# Accept every block device:
|
||||
@ -12,26 +10,26 @@ Maintainer note: Forward ported without editing from lvm2-2.02.108-example.conf.
|
||||
# Reject the cdrom drive:
|
||||
# filter = [ "r|/dev/cdrom|" ]
|
||||
# Work with just loopback devices, e.g. for testing:
|
||||
@@ -620,7 +623,8 @@
|
||||
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
|
||||
# They will stop working once the lvm2 on-disk metadata format is used.
|
||||
@@ -704,7 +707,8 @@
|
||||
# Configuration option global/fallback_to_lvm1.
|
||||
# This setting is no longer used.
|
||||
# This configuration option has an automatic default value.
|
||||
- # fallback_to_lvm1 = @DEFAULT_FALLBACK_TO_LVM1@
|
||||
- # fallback_to_lvm1 = 0
|
||||
+ # Gentoo: the LVM tools are a seperate package.
|
||||
+ fallback_to_lvm1 = 0
|
||||
|
||||
# Configuration option global/format.
|
||||
# The default metadata format that commands should use.
|
||||
@@ -1413,7 +1417,7 @@
|
||||
# This setting is no longer used.
|
||||
@@ -1508,7 +1512,7 @@
|
||||
|
||||
# Configuration section metadata.
|
||||
# This configuration section has an automatic default value.
|
||||
-# metadata {
|
||||
+metadata {
|
||||
|
||||
# Configuration option metadata/pvmetadatacopies.
|
||||
# Number of copies of metadata to store on each PV.
|
||||
@@ -1431,7 +1435,8 @@
|
||||
# Configuration option metadata/check_pv_device_sizes.
|
||||
# Check device sizes are not smaller than corresponding PV sizes.
|
||||
@@ -1553,7 +1557,8 @@
|
||||
#
|
||||
# This configuration option is advanced.
|
||||
# This configuration option has an automatic default value.
|
||||
@ -41,7 +39,7 @@ Maintainer note: Forward ported without editing from lvm2-2.02.108-example.conf.
|
||||
|
||||
# Configuration option metadata/vgmetadatacopies.
|
||||
# Number of copies of metadata to maintain for each VG.
|
||||
@@ -1486,7 +1491,7 @@
|
||||
@@ -1608,7 +1613,7 @@
|
||||
#
|
||||
# This configuration option is advanced.
|
||||
# This configuration option does not have a default value defined.
|
@ -1,22 +1,22 @@
|
||||
--- LVM2.2.02.129/configure.in
|
||||
+++ LVM2.2.02.129/configure.in
|
||||
@@ -1287,6 +1287,7 @@
|
||||
fi])
|
||||
if test "$BLKID_WIPING" = yes; then
|
||||
BLKID_PC="blkid"
|
||||
+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
|
||||
DEFAULT_USE_BLKID_WIPING=1
|
||||
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
|
||||
else
|
||||
@@ -1332,6 +1333,7 @@
|
||||
--- LVM2.2.02.178/configure.ac
|
||||
+++ LVM2.2.02.178/configure.ac
|
||||
@@ -1238,6 +1238,7 @@
|
||||
PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
|
||||
[ BLKID_WIPING=yes
|
||||
BLKID_PC="blkid"
|
||||
+ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
|
||||
DEFAULT_USE_BLKID_WIPING=1
|
||||
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
|
||||
], [if test "$BLKID_WIPING" = maybe; then
|
||||
@@ -1286,6 +1287,7 @@
|
||||
if test "$UDEV_SYNC" = yes; then
|
||||
pkg_config_init
|
||||
PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
|
||||
+ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
|
||||
AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
|
||||
fi
|
||||
|
||||
@@ -1558,19 +1560,32 @@
|
||||
AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1,
|
||||
@@ -1564,19 +1566,32 @@
|
||||
if test "$SELINUX" = yes; then
|
||||
AC_CHECK_LIB([sepol], [sepol_check_context], [
|
||||
AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
|
||||
@ -51,7 +51,7 @@
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
@@ -1902,6 +1917,7 @@
|
||||
@@ -1927,6 +1942,7 @@
|
||||
################################################################################
|
||||
AC_SUBST(APPLIB)
|
||||
AC_SUBST(AWK)
|
||||
@ -59,15 +59,15 @@
|
||||
AC_SUBST(BLKID_PC)
|
||||
AC_SUBST(BUILD_CMIRRORD)
|
||||
AC_SUBST(BUILD_DMEVENTD)
|
||||
@@ -2005,6 +2021,7 @@
|
||||
AC_SUBST(SALCK_CFLAGS)
|
||||
@@ -2037,6 +2053,7 @@
|
||||
AC_SUBST(SALCK_LIBS)
|
||||
AC_SUBST(SBINDIR)
|
||||
AC_SUBST(SELINUX_LIBS)
|
||||
+AC_SUBST(SELINUX_STATIC_LIBS)
|
||||
AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
@@ -2020,6 +2037,7 @@
|
||||
AC_SUBST(SYSCONFDIR)
|
||||
AC_SUBST(SYSTEMD_LIBS)
|
||||
@@ -2053,6 +2070,7 @@
|
||||
AC_SUBST(CACHE_DUMP_CMD)
|
||||
AC_SUBST(CACHE_REPAIR_CMD)
|
||||
AC_SUBST(CACHE_RESTORE_CMD)
|
||||
@ -75,9 +75,9 @@
|
||||
AC_SUBST(UDEV_PC)
|
||||
AC_SUBST(UDEV_RULES)
|
||||
AC_SUBST(UDEV_SYNC)
|
||||
--- LVM2.2.02.129/make.tmpl.in
|
||||
+++ LVM2.2.02.129/make.tmpl.in
|
||||
@@ -43,7 +43,7 @@
|
||||
--- LVM2.2.02.178/make.tmpl.in
|
||||
+++ LVM2.2.02.178/make.tmpl.in
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
LIBS = @LIBS@
|
||||
# Extra libraries always linked with static binaries
|
||||
@ -86,7 +86,7 @@
|
||||
DEFS += @DEFS@
|
||||
# FIXME set this only where it's needed, not globally?
|
||||
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
|
||||
@@ -58,10 +58,13 @@
|
||||
@@ -75,10 +75,13 @@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
READLINE_LIBS = @READLINE_LIBS@
|
||||
SELINUX_LIBS = @SELINUX_LIBS@
|
||||
@ -97,6 +97,6 @@
|
||||
BLKID_CFLAGS = @BLKID_CFLAGS@
|
||||
BLKID_LIBS = @BLKID_LIBS@
|
||||
+BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@
|
||||
SYSTEMD_LIBS = @SYSTEMD_LIBS@
|
||||
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
|
||||
TESTING = @TESTING@
|
||||
|
@ -0,0 +1,68 @@
|
||||
From: "Robin H. Johnson" <robbat2@gentoo.org>
|
||||
Date: Wed, 17 Apr 2019 06:54:27 +0000
|
||||
Subject: [PATCH] dmeventd configurable idle exit time
|
||||
|
||||
dmeventd nominally exits after 1 hour of idle time. There are use cases for
|
||||
this, esp. with socket activation, but also cases where users don't expect
|
||||
dmeventd to exit.
|
||||
|
||||
Provide a tuning knob via environment variable, DMEVENTD_IDLE_EXIT_TIMEOUT,
|
||||
that can be -1 to not exit, or a configurable time for different idle exit.
|
||||
|
||||
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
||||
Fixes: https://bugs.gentoo.org/682556
|
||||
|
||||
diff -Nuar LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.184/daemons/dmeventd/dmeventd.c
|
||||
--- LVM2.2.02.184.orig/daemons/dmeventd/dmeventd.c 2019-03-22 03:14:59.000000000 -0700
|
||||
+++ LVM2.2.02.184/daemons/dmeventd/dmeventd.c 2019-04-17 00:18:23.535029906 -0700
|
||||
@@ -2158,6 +2158,18 @@
|
||||
.server_path = DM_EVENT_FIFO_SERVER
|
||||
};
|
||||
time_t now, idle_exit_timeout = DMEVENTD_IDLE_EXIT_TIMEOUT;
|
||||
+
|
||||
+ /* Provide a basic way to config the idle timeout */
|
||||
+ char* idle_exit_timeout_env = getenv("DMEVENTD_IDLE_EXIT_TIMEOUT") ? : NULL;
|
||||
+ if(NULL != idle_exit_timeout_env) {
|
||||
+ char* endptr;
|
||||
+ idle_exit_timeout = strtol(idle_exit_timeout_env, &endptr, 10);
|
||||
+ if (errno == ERANGE || *endptr != '\0') {
|
||||
+ fprintf(stderr, "DMEVENTD_IDLE_EXIT_TIMEOUT: bad time input\n");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
opterr = 0;
|
||||
optind = 0;
|
||||
|
||||
@@ -2253,7 +2265,7 @@
|
||||
_process_initial_registrations();
|
||||
|
||||
for (;;) {
|
||||
- if (_idle_since) {
|
||||
+ if (_idle_since || _exit_now) {
|
||||
if (_exit_now) {
|
||||
if (_exit_now == DM_SCHEDULED_EXIT)
|
||||
break; /* Only prints shutdown message */
|
||||
@@ -2262,7 +2274,7 @@
|
||||
(long) (time(NULL) - _idle_since));
|
||||
break;
|
||||
}
|
||||
- if (idle_exit_timeout) {
|
||||
+ if (idle_exit_timeout && idle_exit_timeout > 0) {
|
||||
now = time(NULL);
|
||||
if (now < _idle_since)
|
||||
_idle_since = now; /* clock change? */
|
||||
diff -Nuar LVM2.2.02.184.orig/man/dmeventd.8_main LVM2.2.02.184/man/dmeventd.8_main
|
||||
--- LVM2.2.02.184.orig/man/dmeventd.8_main 2019-03-22 03:15:00.000000000 -0700
|
||||
+++ LVM2.2.02.184/man/dmeventd.8_main 2019-04-17 00:17:46.076023638 -0700
|
||||
@@ -143,6 +143,10 @@
|
||||
Variable is set by thin plugin to prohibit recursive interation
|
||||
with dmeventd by any executed lvm2 command from
|
||||
a thin_command environment.
|
||||
+.TP
|
||||
+.B DMEVENTD_IDLE_EXIT_TIMEOUT
|
||||
+Configure the dmeventd idle exit timeout behavior, value in seconds. Default
|
||||
+is 3600 (1 hour). -1 means do not exit.
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
13
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
vendored
Normal file
13
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvm2-2.02.184-mksh_build.patch
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
https://bugs.gentoo.org/686652
|
||||
|
||||
--- LVM2.2.02.184/tools/Makefile.in
|
||||
+++ LVM2.2.02.184/tools/Makefile.in
|
||||
@@ -220,6 +220,6 @@
|
||||
echo "/* Do not edit. This file is generated by the Makefile. */" && \
|
||||
echo -en "const char _command_input[] =\n\n\"" && \
|
||||
$(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
|
||||
- echo "\\n\";" \
|
||||
+ printf "%s\n" "\\n\";" \
|
||||
) > $@
|
||||
|
||||
$(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h
|
@ -0,0 +1,34 @@
|
||||
From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Rajnoha <prajnoha@redhat.com>
|
||||
Date: Tue, 13 Aug 2019 15:18:30 +0200
|
||||
Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
|
||||
|
||||
The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
|
||||
that is ~5 years ago.
|
||||
|
||||
Since systemd/udev version 243, there's a new message printed if unsupported
|
||||
OPTIONS value is used:
|
||||
|
||||
Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
|
||||
---
|
||||
udev/11-dm-lvm.rules.in | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
|
||||
index 91cb991df9..7c589943b7 100644
|
||||
--- a/udev/11-dm-lvm.rules.in
|
||||
+++ b/udev/11-dm-lvm.rules.in
|
||||
@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
|
||||
|
||||
ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||
|
||||
-OPTIONS+="event_timeout=180"
|
||||
-
|
||||
# Do not create symlinks for inappropriate subdevices.
|
||||
ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
|
||||
ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
|
||||
--
|
||||
2.24.0
|
||||
|
@ -1,15 +0,0 @@
|
||||
http://bugs.gentoo.org/330255
|
||||
|
||||
liblvm2app.so: undefined reference to `floor'
|
||||
|
||||
--- LVM2/liblvm/Makefile.in
|
||||
+++ LVM2/liblvm/Makefile.in
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
include $(top_builddir)/make.tmpl
|
||||
|
||||
-LIBS += $(LVMINTERNAL_LIBS) -ldevmapper
|
||||
+LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -lm
|
||||
|
||||
ifeq ("@DMEVENTD@", "yes")
|
||||
LIBS += -ldevmapper-event
|
@ -1,63 +0,0 @@
|
||||
diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/configure.in LVM2.2.02.92/configure.in
|
||||
--- LVM2.2.02.92.orig/configure.in 2012-02-20 11:36:27.000000000 -0800
|
||||
+++ LVM2.2.02.92/configure.in 2012-02-20 15:53:40.700124222 -0800
|
||||
@@ -32,6 +32,7 @@
|
||||
COPTIMISE_FLAG="-O2"
|
||||
CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
|
||||
ELDFLAGS="-Wl,--export-dynamic"
|
||||
+ STATIC_LDFLAGS="-Wl,--no-export-dynamic"
|
||||
# FIXME Generate list and use --dynamic-list=.dlopen.sym
|
||||
CLDWHOLEARCHIVE="-Wl,-whole-archive"
|
||||
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
|
||||
@@ -1458,6 +1459,7 @@
|
||||
AC_SUBST(SELINUX_PC)
|
||||
AC_SUBST(SNAPSHOTS)
|
||||
AC_SUBST(STATICDIR)
|
||||
+AC_SUBST(STATIC_LDFLAGS)
|
||||
AC_SUBST(STATIC_LINK)
|
||||
AC_SUBST(TESTING)
|
||||
AC_SUBST(THIN)
|
||||
diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in LVM2.2.02.92/daemons/dmeventd/Makefile.in
|
||||
--- LVM2.2.02.92.orig/daemons/dmeventd/Makefile.in 2012-02-20 15:48:04.861683196 -0800
|
||||
+++ LVM2.2.02.92/daemons/dmeventd/Makefile.in 2012-02-20 15:52:50.732314588 -0800
|
||||
@@ -65,7 +65,7 @@
|
||||
$(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic
|
||||
|
||||
dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) -o $@ \
|
||||
dmeventd.o $(DL_LIBS) $(LVMLIBS) $(LIBS) $(STATIC_LIBS)
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/make.tmpl.in LVM2.2.02.92/make.tmpl.in
|
||||
--- LVM2.2.02.92.orig/make.tmpl.in 2012-02-20 15:48:05.034685963 -0800
|
||||
+++ LVM2.2.02.92/make.tmpl.in 2012-02-20 15:48:58.622550855 -0800
|
||||
@@ -38,6 +38,7 @@
|
||||
ELDFLAGS += @ELDFLAGS@
|
||||
LDDEPS += @LDDEPS@
|
||||
LDFLAGS += @LDFLAGS@
|
||||
+STATIC_LDFLAGS += @STATIC_LDFLAGS@
|
||||
LIB_SUFFIX = @LIB_SUFFIX@
|
||||
LVMINTERNAL_LIBS = -llvm-internal $(UDEV_LIBS) $(DL_LIBS)
|
||||
DL_LIBS = @DL_LIBS@
|
||||
diff -Nuar --exclude '*.rej' --exclude '*.orig' LVM2.2.02.92.orig/tools/Makefile.in LVM2.2.02.92/tools/Makefile.in
|
||||
--- LVM2.2.02.92.orig/tools/Makefile.in 2011-11-14 13:30:36.000000000 -0800
|
||||
+++ LVM2.2.02.92/tools/Makefile.in 2012-02-20 15:52:25.242901501 -0800
|
||||
@@ -126,7 +126,7 @@
|
||||
-o $@ dmsetup.o -ldevmapper $(LIBS)
|
||||
|
||||
dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \
|
||||
-o $@ dmsetup.o -ldevmapper $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
all: device-mapper
|
||||
@@ -136,7 +136,7 @@
|
||||
$(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
|
||||
|
||||
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
|
||||
$(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
|
||||
|
||||
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
|
@ -1,12 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/lvmetad.pid"
|
||||
command="/sbin/lvmetad"
|
||||
command_args="${LVMETAD_OPTS:=-p ${pidfile}}"
|
||||
start_stop_daemon_args="--pidfile ${pidfile}"
|
||||
|
||||
depend() {
|
||||
:
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/lvmetad.pid"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/lvmlockd.pid"
|
||||
|
17
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
vendored
Normal file
17
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/files/lvmpolld.initd-2.02.183
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
pidfile="/run/lvmpolld.pid"
|
||||
command="/sbin/lvmpolld"
|
||||
command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}"
|
||||
start_stop_daemon_args="--pidfile ${pidfile}"
|
||||
|
||||
depend() {
|
||||
:
|
||||
}
|
||||
|
||||
start_pre()
|
||||
{
|
||||
checkpath --directory /run/lvm || return 1
|
||||
}
|
@ -1,271 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
|
||||
systemd? ( udev )"
|
||||
|
||||
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,274 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,281 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? (
|
||||
app-arch/cpio
|
||||
sys-apps/makedev
|
||||
)
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
ewarn
|
||||
ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
|
||||
ewarn "run the following to update the init script dependencies: "
|
||||
ewarn "# rc-update -u"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,290 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? (
|
||||
app-arch/cpio
|
||||
sys-apps/makedev
|
||||
)
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r4 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
ewarn
|
||||
ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
|
||||
ewarn "run the following to update the init script dependencies: "
|
||||
ewarn "# rc-update -u"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,290 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? (
|
||||
app-arch/cpio
|
||||
sys-apps/makedev
|
||||
)
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
ewarn
|
||||
ewarn "After enabling or disabling lvmetad in /etc/lvm/lvm.conf you must"
|
||||
ewarn "run the following to update the init script dependencies: "
|
||||
ewarn "# rc-update -u"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,271 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
|
||||
systemd? ( udev )
|
||||
static? ( !udev )" #520450
|
||||
|
||||
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.92-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.108-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.106-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_systemd_units install_systemd_generators install_tmpfiles_configuration"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,283 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,284 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,274 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman lvm1 lvm2create_initrd selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !lvm1 !lvm2create_initrd !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="clvm? ( cman? ( =sys-cluster/cman-3* ) =sys-cluster/libdlm-3* )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,284 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,283 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,288 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,290 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
!<sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,293 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
!<sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062
|
||||
|
||||
# Flatcar:
|
||||
"${FILESDIR}"/${PN}-2.02.145-oneshot.patch # https://github.com/lvmteam/lvm2/pull/37
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,294 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
!<sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062
|
||||
|
||||
# Flatcar:
|
||||
"${FILESDIR}"/${PN}-2.02.145-oneshot.patch # https://github.com/lvmteam/lvm2/pull/37
|
||||
"${FILESDIR}"/${PN}-2.02.145-rules.patch # https://sourceware.org/git/?p=lvm2.git;a=commit;h=125f27ac37bc9b93cc96f64052b9681b3d479ee1
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,284 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Gentoo specific modification(s):
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# For upstream -- review and forward:
|
||||
epatch "${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
epatch "${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
epatch "${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
epatch "${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
epatch "${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
epatch "${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf
|
||||
local buildmode
|
||||
|
||||
myconf="${myconf} $(use_enable !device-mapper-only dmeventd)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only cmdlib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only applib)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only fsadm)"
|
||||
myconf="${myconf} $(use_enable !device-mapper-only lvmetad)"
|
||||
use device-mapper-only && myconf="${myconf} --disable-udev-systemd-background-jobs"
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf="${myconf} --enable-static_link"
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf="${myconf} --with-mirrors=${dmbuildmode}"
|
||||
myconf="${myconf} --with-snapshots=${dmbuildmode}"
|
||||
if use thin; then
|
||||
myconf="${myconf} --with-thin=internal --with-cache=internal"
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf="${myconf} --with-thin-${texec}=${EPREFIX}/sbin/thin_${texec}"
|
||||
myconf="${myconf} --with-cache-${texec}=${EPREFIX}/sbin/cache_${texec}"
|
||||
done
|
||||
else
|
||||
myconf="${myconf} --with-thin=none --with-cache=none"
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf="${myconf} --with-lvm1=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-lvm1=none"
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf="${myconf} --disable-o_direct"
|
||||
|
||||
if use clvm; then
|
||||
myconf="${myconf} --with-cluster=${buildmode}"
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf="${myconf} --with-clvmd=${clvmd}"
|
||||
myconf="${myconf} --with-pool=${buildmode}"
|
||||
else
|
||||
myconf="${myconf} --with-clvmd=none --with-cluster=none"
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
"$(systemd_with_unitdir)" \
|
||||
${myconf} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.105-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.105-r2 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,297 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais sanlock selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !sanlock !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
sanlock? ( sys-cluster/sanlock )
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable sanlock lockd-sanlock) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.166-r2 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use sanlock; then
|
||||
newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,290 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools eutils linux-info multilib systemd toolchain-funcs udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd clvm cman corosync lvm1 lvm2create_initrd openais selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !clvm !cman !corosync !lvm1 !lvm2create_initrd !openais !thin )
|
||||
systemd? ( udev )
|
||||
clvm? ( !systemd )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
clvm? (
|
||||
cman? ( =sys-cluster/cman-3* )
|
||||
corosync? ( sys-cluster/corosync )
|
||||
openais? ( sys-cluster/openais )
|
||||
=sys-cluster/libdlm-3*
|
||||
)
|
||||
|
||||
readline? ( sys-libs/readline:0= )
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
udev? ( >=virtual/libudev-208:=[static-libs?] )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/clvm
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
# USE 'static' currently only works with eudev, bug 520450
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
virtual/pkgconfig
|
||||
>=sys-devel/binutils-2.20.1-r1
|
||||
sys-devel/autoconf-archive
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
udev? ( >=sys-fs/eudev-3.1.2[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
|
||||
S=${WORKDIR}/${PN/lvm/LVM}.${PV}
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.129-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.70-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.139-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.129-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.130-pthread-pkgconfig.patch #492450
|
||||
#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.in,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Without thin-privision-tools, there is nothing to install for target install_man7:
|
||||
use thin || { sed -i -e '/^install_lvm2/s:install_man7::' man/Makefile.in || die; }
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myconf=()
|
||||
local buildmode
|
||||
|
||||
myconf+=( $(use_enable !device-mapper-only dmeventd) )
|
||||
myconf+=( $(use_enable !device-mapper-only cmdlib) )
|
||||
myconf+=( $(use_enable !device-mapper-only applib) )
|
||||
myconf+=( $(use_enable !device-mapper-only fsadm) )
|
||||
myconf+=( $(use_enable !device-mapper-only lvmetad) )
|
||||
use device-mapper-only && myconf+=( --disable-udev-systemd-background-jobs )
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
if use static; then
|
||||
buildmode="internal"
|
||||
# This only causes the .static versions to become available
|
||||
myconf+=( --enable-static_link )
|
||||
else
|
||||
buildmode="shared"
|
||||
fi
|
||||
dmbuildmode=$(use !device-mapper-only && echo internal || echo none)
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
myconf+=( --with-mirrors=${dmbuildmode} )
|
||||
myconf+=( --with-snapshots=${dmbuildmode} )
|
||||
if use thin; then
|
||||
myconf+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myconf+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myconf+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myconf+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
if use lvm1; then
|
||||
myconf+=( --with-lvm1=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-lvm1=none )
|
||||
fi
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
use hppa && myconf+=( --disable-o_direct )
|
||||
|
||||
if use clvm; then
|
||||
myconf+=( --with-cluster=${buildmode} )
|
||||
# 4-state! Make sure we get it right, per bug 210879
|
||||
# Valid options are: none, cman, gulm, all
|
||||
#
|
||||
# 2009/02:
|
||||
# gulm is removed now, now dual-state:
|
||||
# cman, none
|
||||
# all still exists, but is not needed
|
||||
#
|
||||
# 2009/07:
|
||||
# TODO: add corosync and re-enable ALL
|
||||
local clvmd=""
|
||||
use cman && clvmd="cman"
|
||||
#clvmd="${clvmd/cmangulm/all}"
|
||||
use corosync && clvmd="${clvmd:+$clvmd,}corosync"
|
||||
use openais && clvmd="${clvmd:+$clvmd,}openais"
|
||||
[ -z "${clvmd}" ] && clvmd="none"
|
||||
myconf+=( --with-clvmd=${clvmd} )
|
||||
myconf+=( --with-pool=${buildmode} )
|
||||
else
|
||||
myconf+=( --with-clvmd=none --with-cluster=none )
|
||||
fi
|
||||
|
||||
econf \
|
||||
$(use_enable readline) \
|
||||
$(use_enable selinux) \
|
||||
--enable-pkgconfig \
|
||||
--with-confdir="${EPREFIX}"/etc \
|
||||
--exec-prefix="${EPREFIX}" \
|
||||
--sbindir="${EPREFIX}/sbin" \
|
||||
--with-staticdir="${EPREFIX}"/sbin \
|
||||
--libdir="${EPREFIX}/$(get_libdir)" \
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)" \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
$(use_enable udev udev_rules) \
|
||||
$(use_enable udev udev_sync) \
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d) \
|
||||
$(use_enable systemd udev-systemd-background-jobs) \
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
|
||||
${myconf[@]} \
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake device-mapper
|
||||
else
|
||||
emake
|
||||
emake CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst
|
||||
INSTALL_TARGETS="install install_tmpfiles_configuration"
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS="${INSTALL_TARGETS} install_systemd_units install_systemd_generators"
|
||||
use device-mapper-only && INSTALL_TARGETS="install_device-mapper"
|
||||
for inst in ${INSTALL_TARGETS}; do
|
||||
emake DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.116-r6 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
fi
|
||||
|
||||
if use clvm; then
|
||||
newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd
|
||||
newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
#gen_usr_ldscript libdevmapper.so
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
#gen_usr_ldscript libdevmapper-event.so
|
||||
else
|
||||
rm -f "${ED}"usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
304
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild
vendored
Normal file
304
sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild
vendored
Normal file
@ -0,0 +1,304 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
TMPFILES_OPTIONAL=1
|
||||
inherit autotools linux-info systemd toolchain-funcs tmpfiles udev flag-o-matic
|
||||
|
||||
DESCRIPTION="User-land utilities for LVM2 (device-mapper) software"
|
||||
HOMEPAGE="https://sourceware.org/lvm2/"
|
||||
SRC_URI="ftp://sourceware.org/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz
|
||||
ftp://sourceware.org/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="readline static static-libs systemd lvm2create_initrd sanlock selinux +udev +thin device-mapper-only"
|
||||
REQUIRED_USE="device-mapper-only? ( !lvm2create_initrd !sanlock !thin )
|
||||
static? ( !systemd !udev )
|
||||
static-libs? ( !udev )
|
||||
systemd? ( udev )"
|
||||
|
||||
DEPEND_COMMON="
|
||||
dev-libs/libaio[static-libs?]
|
||||
static? ( dev-libs/libaio[static-libs] )
|
||||
!static? ( dev-libs/libaio[static-libs?] )
|
||||
readline? ( sys-libs/readline:0= )
|
||||
sanlock? ( sys-cluster/sanlock )
|
||||
systemd? ( >=sys-apps/systemd-205:0= )
|
||||
udev? ( >=virtual/libudev-208:= )"
|
||||
# /run is now required for locking during early boot. /var cannot be assumed to
|
||||
# be available -- thus, pull in recent enough baselayout for /run.
|
||||
# This version of LVM is incompatible with cryptsetup <1.1.2.
|
||||
RDEPEND="${DEPEND_COMMON}
|
||||
>=sys-apps/baselayout-2.2
|
||||
!<sys-apps/openrc-0.11
|
||||
!<sys-fs/cryptsetup-1.1.2
|
||||
!!sys-fs/lvm-user
|
||||
>=sys-apps/util-linux-2.16
|
||||
lvm2create_initrd? ( sys-apps/makedev )
|
||||
!device-mapper-only? ( virtual/tmpfiles )
|
||||
thin? ( >=sys-block/thin-provisioning-tools-0.3.0 )"
|
||||
# note: thin- 0.3.0 is required to avoid --disable-thin_check_needs_check
|
||||
DEPEND="${DEPEND_COMMON}
|
||||
static? (
|
||||
selinux? ( sys-libs/libselinux[static-libs] )
|
||||
>=sys-apps/util-linux-2.16[static-libs]
|
||||
)"
|
||||
BDEPEND="
|
||||
sys-devel/autoconf-archive
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${PN/lvm/LVM}.${PV}"
|
||||
|
||||
PATCHES=(
|
||||
# Gentoo specific modification(s):
|
||||
"${FILESDIR}"/${PN}-2.02.178-example.conf.in.patch
|
||||
|
||||
# For upstream -- review and forward:
|
||||
"${FILESDIR}"/${PN}-2.02.63-always-make-static-libdm.patch
|
||||
"${FILESDIR}"/${PN}-2.02.56-lvm2create_initrd.patch
|
||||
"${FILESDIR}"/${PN}-2.02.67-createinitrd.patch #301331
|
||||
"${FILESDIR}"/${PN}-2.02.99-locale-muck.patch #330373
|
||||
"${FILESDIR}"/${PN}-2.02.178-asneeded.patch # -Wl,--as-needed
|
||||
"${FILESDIR}"/${PN}-2.02.178-dynamic-static-ldflags.patch #332905
|
||||
"${FILESDIR}"/${PN}-2.02.178-static-pkgconfig-libs.patch #370217, #439414 + blkid
|
||||
"${FILESDIR}"/${PN}-2.02.176-pthread-pkgconfig.patch #492450
|
||||
"${FILESDIR}"/${PN}-2.02.171-static-libm.patch #617756
|
||||
"${FILESDIR}"/${PN}-2.02.166-HPPA-no-O_DIRECT.patch #657446
|
||||
#"${FILESDIR}"/${PN}-2.02.145-mkdev.patch #580062 # Merged upstream
|
||||
"${FILESDIR}"/${PN}-2.02.184-dmeventd-no-idle-exit.patch
|
||||
#"${FILESDIR}"/${PN}-2.02.184-allow-reading-metadata-with-invalid-creation_time.patch #682380 # merged upstream
|
||||
"${FILESDIR}"/${PN}-2.02.184-mksh_build.patch #686652
|
||||
"${FILESDIR}"/${PN}-2.02.186-udev_remove_unsupported_option.patch #700160
|
||||
"${FILESDIR}"/${PN}-2.02.145-oneshot.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~SYSVIPC"
|
||||
|
||||
if use udev; then
|
||||
local WARNING_SYSVIPC="CONFIG_SYSVIPC:\tis not set (required for udev sync)\n"
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [[ -n "${uevent_helper_path}" ]] && [[ "${uevent_helper_path}" != '""' ]]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
|
||||
# 1. Genkernel no longer copies /sbin/lvm blindly.
|
||||
if use static; then
|
||||
elog "Warning, we no longer overwrite /sbin/lvm and /sbin/dmsetup with"
|
||||
elog "their static versions. If you need the static binaries,"
|
||||
elog "you must append .static to the filename!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i \
|
||||
-e "1iAR = $(tc-getAR)" \
|
||||
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \
|
||||
make.tmpl.in || die #444082
|
||||
|
||||
sed -i -e '/FLAG/s:-O2::' configure{.ac,} || die #480212
|
||||
|
||||
if use udev && ! use device-mapper-only; then
|
||||
sed -i -e '/use_lvmetad =/s:0:1:' conf/example.conf.in || die #514196
|
||||
elog "Notice that \"use_lvmetad\" setting is enabled with USE=\"udev\" in"
|
||||
elog "/etc/lvm/lvm.conf, which will require restart of udev, lvm, and lvmetad"
|
||||
elog "if it was previously disabled."
|
||||
fi
|
||||
|
||||
sed -i -e "s:/usr/bin/true:$(type -P true):" scripts/blk_availability_systemd_red_hat.service.in || die #517514
|
||||
|
||||
# Don't install thin man page when not requested
|
||||
if ! use thin ; then
|
||||
sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -flto
|
||||
local myeconfargs=()
|
||||
|
||||
# Most of this package does weird stuff.
|
||||
# The build options are tristate, and --without is NOT supported
|
||||
# options: 'none', 'internal', 'shared'
|
||||
myeconfargs+=(
|
||||
$(use_enable !device-mapper-only dmfilemapd)
|
||||
$(use_enable !device-mapper-only dmeventd)
|
||||
$(use_enable !device-mapper-only cmdlib)
|
||||
$(use_enable !device-mapper-only applib)
|
||||
$(use_enable !device-mapper-only fsadm)
|
||||
$(use_enable !device-mapper-only lvmetad)
|
||||
$(use_enable !device-mapper-only lvmpolld)
|
||||
$(usex device-mapper-only --disable-udev-systemd-background-jobs '')
|
||||
|
||||
# This only causes the .static versions to become available
|
||||
$(usex static --enable-static_link '')
|
||||
|
||||
# dmeventd requires mirrors to be internal, and snapshot available
|
||||
# so we cannot disable them
|
||||
--with-mirrors="$(usex device-mapper-only none internal)"
|
||||
--with-snapshots="$(usex device-mapper-only none internal)"
|
||||
|
||||
# disable O_DIRECT support on hppa, breaks pv detection (#99532)
|
||||
$(usex hppa --disable-o_direct '')
|
||||
)
|
||||
|
||||
if use thin; then
|
||||
myeconfargs+=( --with-thin=internal --with-cache=internal )
|
||||
local texec
|
||||
for texec in check dump repair restore; do
|
||||
myeconfargs+=( --with-thin-${texec}="${EPREFIX}"/sbin/thin_${texec} )
|
||||
myeconfargs+=( --with-cache-${texec}="${EPREFIX}"/sbin/cache_${texec} )
|
||||
done
|
||||
else
|
||||
myeconfargs+=( --with-thin=none --with-cache=none )
|
||||
fi
|
||||
|
||||
myeconfargs+=( --with-clvmd=none --with-cluster=none )
|
||||
|
||||
myeconfargs+=(
|
||||
$(use_enable readline)
|
||||
$(use_enable selinux)
|
||||
--enable-pkgconfig
|
||||
--with-confdir="${EPREFIX}"/etc
|
||||
--exec-prefix="${EPREFIX}"
|
||||
--sbindir="${EPREFIX}/sbin"
|
||||
--with-staticdir="${EPREFIX}"/sbin
|
||||
--libdir="${EPREFIX}/$(get_libdir)"
|
||||
--with-usrlibdir="${EPREFIX}/usr/$(get_libdir)"
|
||||
--with-default-dm-run-dir=/run
|
||||
--with-default-run-dir=/run/lvm
|
||||
--with-default-locking-dir=/run/lock/lvm
|
||||
--with-default-pid-dir=/run
|
||||
$(use_enable udev udev_rules)
|
||||
$(use_enable udev udev_sync)
|
||||
$(use_with udev udevdir "$(get_udevdir)"/rules.d)
|
||||
$(use_enable sanlock lvmlockd-sanlock)
|
||||
$(use_enable systemd udev-systemd-background-jobs)
|
||||
$(use_enable systemd notify-dbus)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
CLDFLAGS="${LDFLAGS}"
|
||||
)
|
||||
# Hard-wire this to bash as some shells (dash) don't know
|
||||
# "-o pipefail" #682404
|
||||
CONFIG_SHELL="/bin/bash" \
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pushd include >/dev/null
|
||||
emake V=1
|
||||
popd >/dev/null
|
||||
|
||||
if use device-mapper-only ; then
|
||||
emake V=1 device-mapper
|
||||
else
|
||||
emake V=1
|
||||
emake V=1 CC="$(tc-getCC)" -C scripts lvm2_activation_generator_systemd_red_hat
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local inst INSTALL_TARGETS
|
||||
INSTALL_TARGETS=( install install_tmpfiles_configuration )
|
||||
# install systemd related files only when requested, bug #522430
|
||||
use systemd && INSTALL_TARGETS+=( install_systemd_units install_systemd_generators )
|
||||
use device-mapper-only && INSTALL_TARGETS=( install_device-mapper )
|
||||
for inst in ${INSTALL_TARGETS[@]}; do
|
||||
emake V=1 DESTDIR="${D}" ${inst}
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}"/device-mapper.rc-2.02.105-r2 device-mapper
|
||||
newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper
|
||||
|
||||
if use !device-mapper-only ; then
|
||||
newinitd "${FILESDIR}"/dmeventd.initd-2.02.184-r2 dmeventd
|
||||
newinitd "${FILESDIR}"/lvm.rc-2.02.187 lvm
|
||||
newconfd "${FILESDIR}"/lvm.confd-2.02.184-r3 lvm
|
||||
if ! use udev ; then
|
||||
# We keep the variable but remove udev from it.
|
||||
sed -r -i \
|
||||
-e '/^rc_need=/s/\<udev\>//g' \
|
||||
"${ED}/etc/conf.d/lvm" || die "Could not drop udev from rc_need"
|
||||
fi
|
||||
|
||||
newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.105-r2 lvm-monitoring
|
||||
newinitd "${FILESDIR}"/lvmetad.initd-2.02.116-r3 lvmetad
|
||||
newinitd "${FILESDIR}"/lvmpolld.initd-2.02.183 lvmpolld
|
||||
fi
|
||||
|
||||
if use sanlock; then
|
||||
newinitd "${FILESDIR}"/lvmlockd.initd-2.02.166-r1 lvmlockd
|
||||
fi
|
||||
|
||||
if use static-libs; then
|
||||
dolib.a libdm/ioctl/libdevmapper.a
|
||||
if use !device-mapper-only; then
|
||||
# depends on lvmetad
|
||||
dolib.a libdaemon/client/libdaemonclient.a #462908
|
||||
# depends on dmeventd
|
||||
dolib.a daemons/dmeventd/libdevmapper-event.a
|
||||
fi
|
||||
else
|
||||
rm -f "${ED}"/usr/$(get_libdir)/{libdevmapper-event,liblvm2cmd,liblvm2app,libdevmapper}.a
|
||||
fi
|
||||
|
||||
if use lvm2create_initrd; then
|
||||
dosbin scripts/lvm2create_initrd/lvm2create_initrd
|
||||
doman scripts/lvm2create_initrd/lvm2create_initrd.8
|
||||
newdoc scripts/lvm2create_initrd/README README.lvm2create_initrd
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/dmtab
|
||||
|
||||
dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use device-mapper-only; then
|
||||
tmpfiles_process lvm2.conf
|
||||
fi
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
ewarn "Make sure the \"lvm\" init script is in the runlevels:"
|
||||
ewarn "# rc-update add lvm boot"
|
||||
ewarn
|
||||
ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want"
|
||||
ewarn "to enable lvm autoactivation and metadata caching."
|
||||
fi
|
||||
|
||||
if use udev && [[ -d /run ]] ; then
|
||||
local permission_run_expected="drwxr-xr-x"
|
||||
local permission_run=$(stat -c "%A" /run)
|
||||
if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then
|
||||
ewarn "Found the following problematic permissions:"
|
||||
ewarn ""
|
||||
ewarn " ${permission_run} /run"
|
||||
ewarn ""
|
||||
ewarn "Expected:"
|
||||
ewarn ""
|
||||
ewarn " ${permission_run_expected} /run"
|
||||
ewarn ""
|
||||
ewarn "This is known to be causing problems for UDEV-enabled LVM services."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo "Tests are disabled because of device-node mucking, if you want to"
|
||||
einfo "run tests, compile the package and see ${S}/tests"
|
||||
}
|
@ -1,27 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>robbat2@gentoo.org</email>
|
||||
<name>Robin H. Johnson</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>agk@redhat.com</email>
|
||||
<name>Alasdair Kergon</name>
|
||||
<description>Upstream Maintainer (please CC on bugs)</description>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>cardoe@gentoo.org</email>
|
||||
<name>Doug Goldstein</name>
|
||||
<description>Backup to Robin. Please CC on bugs.</description>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="clvm">Allow users to build clustered lvm2</flag>
|
||||
<flag name="cman">Cman support for clustered lvm</flag>
|
||||
<flag name="corosync">Corosync support for clustered lvm</flag>
|
||||
<flag name="lvm1">Allow users to build lvm2 with lvm1 support</flag>
|
||||
<flag name="lvm2create_initrd">Install lvm2create_initrd script and pull in <pkg>sys-apps/makedev</pkg> for the /sbin/MAKEDEV command</flag>
|
||||
<flag name="openais">Openais support for clustered lvm</flag>
|
||||
<flag name="thin">Support for thin volumes</flag>
|
||||
<flag name="device-mapper-only">Build only device-mapper and not the rest of LVM2 (UNSUPPORTED)</flag>
|
||||
<flag name="sanlock">Enable lvmlockd with support for sanlock</flag>
|
||||
|
Loading…
Reference in New Issue
Block a user