From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-admin/salt/Manifest | 27 ++++ app-admin/salt/files/api-confd-1 | 5 + app-admin/salt/files/api-initd-4 | 14 ++ app-admin/salt/files/master-confd-1 | 5 + app-admin/salt/files/master-initd-4 | 14 ++ app-admin/salt/files/minion-confd-1 | 5 + app-admin/salt/files/minion-initd-4 | 15 ++ .../salt/files/salt-2016.11.0-broken-tests.patch | 23 +++ .../salt-2016.11.0-remove-file-tree-test.patch | 34 +++++ app-admin/salt/files/salt-2016.11.0-tmpdir.patch | 34 +++++ .../files/salt-2016.3.1-dont-realpath-tmpdir.patch | 18 +++ .../files/salt-2016.3.4-test-nonexist-dirs.patch | 32 +++++ .../files/salt-2017.7.0-dont-realpath-tmpdir.patch | 19 +++ app-admin/salt/files/salt-2017.7.3-tests.patch | 66 +++++++++ ...salt-2018.3.2-skip-zeromq-test-that-hangs.patch | 79 +++++++++++ app-admin/salt/files/salt-api.service | 10 ++ app-admin/salt/files/salt-master.service | 10 ++ app-admin/salt/files/salt-minion.service | 10 ++ app-admin/salt/files/salt-syndic.service | 10 ++ app-admin/salt/files/syndic-confd-1 | 5 + app-admin/salt/files/syndic-initd-4 | 14 ++ app-admin/salt/metadata.xml | 44 ++++++ app-admin/salt/salt-2016.11.9-r2.ebuild | 153 ++++++++++++++++++++ app-admin/salt/salt-2017.7.7.ebuild | 150 ++++++++++++++++++++ app-admin/salt/salt-2018.3.2.ebuild | 155 +++++++++++++++++++++ 25 files changed, 951 insertions(+) create mode 100644 app-admin/salt/Manifest create mode 100644 app-admin/salt/files/api-confd-1 create mode 100644 app-admin/salt/files/api-initd-4 create mode 100644 app-admin/salt/files/master-confd-1 create mode 100644 app-admin/salt/files/master-initd-4 create mode 100644 app-admin/salt/files/minion-confd-1 create mode 100644 app-admin/salt/files/minion-initd-4 create mode 100644 app-admin/salt/files/salt-2016.11.0-broken-tests.patch create mode 100644 app-admin/salt/files/salt-2016.11.0-remove-file-tree-test.patch create mode 100644 app-admin/salt/files/salt-2016.11.0-tmpdir.patch create mode 100644 app-admin/salt/files/salt-2016.3.1-dont-realpath-tmpdir.patch create mode 100644 app-admin/salt/files/salt-2016.3.4-test-nonexist-dirs.patch create mode 100644 app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch create mode 100644 app-admin/salt/files/salt-2017.7.3-tests.patch create mode 100644 app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch create mode 100644 app-admin/salt/files/salt-api.service create mode 100644 app-admin/salt/files/salt-master.service create mode 100644 app-admin/salt/files/salt-minion.service create mode 100644 app-admin/salt/files/salt-syndic.service create mode 100644 app-admin/salt/files/syndic-confd-1 create mode 100644 app-admin/salt/files/syndic-initd-4 create mode 100644 app-admin/salt/metadata.xml create mode 100644 app-admin/salt/salt-2016.11.9-r2.ebuild create mode 100644 app-admin/salt/salt-2017.7.7.ebuild create mode 100644 app-admin/salt/salt-2018.3.2.ebuild (limited to 'app-admin/salt') diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest new file mode 100644 index 000000000000..fb4c87cb007e --- /dev/null +++ b/app-admin/salt/Manifest @@ -0,0 +1,27 @@ +AUX api-confd-1 188 BLAKE2B 8ac416a7ff64c73556f07a08268ea7d91547e242becd345ac35da7b64f6b2e4aba276e8920e7353bd2caeaffa3034349496b00622191793994bbd4d25faa3c3c SHA512 c58fc025a3654b59f79c6e23fe135d75ebad8b166bc5214f4842c3dd92192e3598480f9fd6960ad2dc36d3ee45ff971650c5e0156353c1c045650f86c9a68db9 +AUX api-initd-4 302 BLAKE2B 385e678ea2fe06f413e68a3812350df823318a2807805373377e747c3a82e524af114aeccab8a6e6e36b1419a3e0a6bf025749db585483906487767e76274376 SHA512 098fb6e1ba83270abd31f9cc3afdc159149276962fcf73ce0ae943df87ec26d0883990652614cdeef48912778780731f91efc972a22a75c4b10f3bd79a251a90 +AUX master-confd-1 188 BLAKE2B 8ac416a7ff64c73556f07a08268ea7d91547e242becd345ac35da7b64f6b2e4aba276e8920e7353bd2caeaffa3034349496b00622191793994bbd4d25faa3c3c SHA512 c58fc025a3654b59f79c6e23fe135d75ebad8b166bc5214f4842c3dd92192e3598480f9fd6960ad2dc36d3ee45ff971650c5e0156353c1c045650f86c9a68db9 +AUX master-initd-4 311 BLAKE2B 302e71b0328d47addd1508e1992ee56c719463d4b99af37b626835fefd28f9c3184e8441035f055992489b1084f1fdd45542466b359c206305e8174fef853478 SHA512 d44ea9fdf962ded6d0c6ac5a1f89ec8729a9a70517ba0f132c54696d32bc96030c64af09f48037867006bd3acdf4b6db759ca873717cd5a88701e42d06885bcc +AUX minion-confd-1 188 BLAKE2B ad20094c30f9aa573397d347f9fb11acafba2f724b6c836d7ec57f10d4182c300a4b0ec572b5f3301174febdfc69c30752c3b0eabdfdf9f4963b03531db23523 SHA512 0051e13351cef8db81dc075a194bb384723f07d5591b5b4d3f3adf4180afaf7beced470ab79ceca9d1ec0dae62dbd72084eb76af009fc78411a011050a94a2ed +AUX minion-initd-4 317 BLAKE2B 4c207bd26a72d5dded38e40f7869f46263272a841b978f138248d016a06e837c3aebebabd15314e3896b404058c3f5dd5e6a1cca48450b07b88b6edef6a8d7d2 SHA512 80790ed1b5f86b713ca6384d60253676b16b10c122810ed07b7119c3860bedfe40102f6b7de86d832f084d84f87bf9405ec282629f981767a534d2a53144845f +AUX salt-2016.11.0-broken-tests.patch 1092 BLAKE2B 5ab3cccc024b5cdc4e6eecd5f164c9f931aa25b23264151ef15645e63e1586f2a093f29a9835685482d831b98e131a385799d39b9158c865af83724a994bbdb1 SHA512 d23c16a5ed8c0fbd4287d73e45b700d465224c5f3b32c47bb2994703a4b4c261053b9c79444973cfaf86afa2850b8499a6b7923317fde3de43840a575ada74b4 +AUX salt-2016.11.0-remove-file-tree-test.patch 1480 BLAKE2B ad2285dd37d5a727feac291c5598b4dc56c98674566c3816fb17577ce44da4d20ddb60c1f0b8a8c8f7d2fe6f33918d00e5010c47c4441728f6a1a9ca94cf4015 SHA512 0503b4ecd16c2f67b53f1ce52b5f77cacf8de420024c5c7751d3caa06de2d1e685eef8d4021dfe86a5850ac23f58705a375e87922b3c5fbeb8c11290690624bc +AUX salt-2016.11.0-tmpdir.patch 1480 BLAKE2B c5501459ba32a5ef08317f4e1a247a7ac2ad563be100f80bfb97a14821af43134dce76d46d9c9431f8b2866eec0272e6de62e281c9a469f8177f214e7c5f6a7e SHA512 ef654d871178618dab68ad9b4062560cfa57fa421834b142639a11d12679ebc97afc27fa572dd77b74d86ba722bb8575b64045bbf3cab9f2d0e2cefeca38c4bd +AUX salt-2016.3.1-dont-realpath-tmpdir.patch 853 BLAKE2B e78c50d1050adad0d21523229034a24f1fd2c977172f3135dbf09440ed6d7e292f0dd9c267c3277edfe8528bf38d269939d068b4af8671da08c64f5712c0d7e1 SHA512 a6bc22959975ac25df84c54437a1638e95d78c057920ced38b0accddca11eb33ad39f2a43dd05648584cd10b140f7ee509a8c6739c4d89d30500452c91795b79 +AUX salt-2016.3.4-test-nonexist-dirs.patch 1655 BLAKE2B 5e7907e0a10c4ee78b599ec98d38088c97889ae2002602db0c207fb210e2960e7b4b92c08f027854e6dd9205b000bb09e7b243346af755e6824561752e3ef2e9 SHA512 ee81b8104f066e1d161207fe82d8349eb8c40701544784a2b6e66842fe9e07d7edffa24cad8c5d2037e2e7fa0368c614ed177fdf7359c89255d068767968e8fd +AUX salt-2017.7.0-dont-realpath-tmpdir.patch 834 BLAKE2B e70496f3ab18b954e7cacd29dbdee6ccbe0a07f139903360312db247926867a78513cd9022f492ce370eeafcc81bc4db545359036f8f5b0d2d64d3c5bb8aefc0 SHA512 33b69954e8112c0f76654d507df74a4cdd37e8227848f2ce0652b3ecee8b847253ccad33cada0e3dd1471c54c780dcc12d5e546c4ec43868511b95b0c7f71e17 +AUX salt-2017.7.3-tests.patch 3096 BLAKE2B bde978ec7d9ca3f303e859d8ecc728ee16e6b1753afe2325f95b0938ed2828ac5b3f80ac92451f6ab4bf7f08f141b71df88641da9694828657dd358059df9826 SHA512 0db8e8dffeabd9f7c0c619480425c58f4b58a486e1866062c8a482489bb79fd6f31c06020ed83e1903a346cbacb221ba541a2363d4e983e583313adb4652d22f +AUX salt-2018.3.2-skip-zeromq-test-that-hangs.patch 2820 BLAKE2B e531bddf576322f8417e7e362bfed7aa21ce8f1edc1702074f250efc9118c755664bd2976282399b725c1f56362e37fa07064b9e4ac2a72c413a56b13d325cdd SHA512 72cbc1e7c8d59883bcbe8130fdbae6e1ccecfabe74069a7389e63f797609930036c593204ab441cff92933d3d35a24feb7db0dc76804d76608190e93a8bc6ed4 +AUX salt-api.service 166 BLAKE2B 32d28ef4ef3c60942bed3fa3a01d70a9af387705844326cdf9339d7c887238a1e6817d78ffd1cb205a6397a2138c2389ea00bf53be84a17b23bea140279bf42c SHA512 bab6b8380c965bf16e23078ebe6f38d942300829d4c89ddf23b630bd57b4d371f80687d85dd9e0cc1b669f2ca882aecde1bc8d7d82382a02ed20e493d3f04702 +AUX salt-master.service 169 BLAKE2B 15e7a4f64cfa75eb8d8576a7d0b61ea0c9937c94fd2130fd6c123a82187f08b5ed533c168a7310fd94d9bd2cecf9d0ba94665c653a971ef61e5e18ffdf087a15 SHA512 87fe27fc0748f4191bd1c6883bb362c95cce8fe1f409e2679b229ddfd9de6c99438859dfa0a47b042977d659029ef56e406f1e8aa01761bff21af4784f9dd5f8 +AUX salt-minion.service 162 BLAKE2B 6f7b6b72e26d1651dbcb324b1e0cfef9f4b5a794f40566297c5bc469b351587db4d9805bed124774107efb64e6ed3e25fefa899b42a38064ee6fe26fd990ae58 SHA512 99f0a5c696e38b42b283416736a23e535ccc53095928b205914cf4b69c0df931a6752205985726527f7889b01dfece78466be28448458b15064edd04aca3e5ed +AUX salt-syndic.service 169 BLAKE2B 0d00f20b4663804eaa4b6a1a1b32ed87b04d1f4df6a8e8e0b2a0e3d17f71e1bb53f71f6168446aaf3765692cd540217c4cdf5ab8dd9cb7032801aa798d8a9bc3 SHA512 b45509a22a18f573726a868fda1591eaf42ef44220960dda698274ba8ff1db8cdc302605133ab61b188e15017ba15c5f409f3ee64e026b635ac359eea7aad7d0 +AUX syndic-confd-1 188 BLAKE2B ad20094c30f9aa573397d347f9fb11acafba2f724b6c836d7ec57f10d4182c300a4b0ec572b5f3301174febdfc69c30752c3b0eabdfdf9f4963b03531db23523 SHA512 0051e13351cef8db81dc075a194bb384723f07d5591b5b4d3f3adf4180afaf7beced470ab79ceca9d1ec0dae62dbd72084eb76af009fc78411a011050a94a2ed +AUX syndic-initd-4 311 BLAKE2B aab3b44f65dedb30ea4eb573872c0253e4d7b438a533f22a4e887c1e6487682efce7f5b75d3bcf366ef706a9fb1578dce537ac5b50324239378cecbd0715ad5d SHA512 69cc10fa7d9f0f4a68d223272c08ee33af242a50eb9bbea919d61f6cb5baf1ce986b07d69fc0e47e2f6dffc0a11100c3bc0d836d2938c46aa364beecb47f07ef +DIST salt-2016.11.9.tar.gz 10062996 BLAKE2B 5176d04d07a69de21c9c136c201d334614c5675fd78e306a0160fae829b633441cd859f4ba1a0822dfbb9ae716475c53f6eb058187d4acc8a5770dd4ceace577 SHA512 896fd27c111e926e246b51d00b69d41c8f4d25ec0c034c9ff3dc5414f5e93592fd637cdeaecf02b3b98a4e5a7ce478bfda86b15497961078374608d76516593d +DIST salt-2017.7.7.tar.gz 11131480 BLAKE2B ea01c8894433cf96697c830d58184bfefca52dcd1be9b1c398270acc229886eeb41edf83d1498fc500f23209fc4e56ba8471da88383bd4c1a9338262423477fb SHA512 01cba364e2dcb5021b2b3b738462645c84332bbf31c0fa82f017fc583a097dccde308fd86be54d2b429921f34c89a4a40b942385c3bc139eb11753d155664063 +DIST salt-2018.3.2.tar.gz 12996445 BLAKE2B 8411fb0891e23ce8e35157662a0a45c0c5b13b62f3fd21cc4bbe5152f923a98b27cb5bee4fb8cb3e6ec5c9daed1afa27baf4b570b94f9f40eddc0891f72829e9 SHA512 142ebe13638d7e6dd0aecc9f0325002d30e115fe8688f5f74cbeb7ff21020327d65ded0dcd845e55362b97568b696887fa22243d66d5eadef65f97152d4775d3 +EBUILD salt-2016.11.9-r2.ebuild 4813 BLAKE2B 63f1878b36fd4119ee145b799818fdcb33c8d1dc8c8b81627b03de4141a148d7457a63f6fe7b4b8c9fa00d8a2a3b09e2c844fe0f98252709c13ddfa78be96666 SHA512 40459666f806112619a1326547dfadd6aebf68e275b195744a5d113d92aed707048925467318ee753451cd0856e015b2fb7879bc0e27a7475572d6c99a1489a1 +EBUILD salt-2017.7.7.ebuild 4621 BLAKE2B cdf19dd14e998384dd0ef852ef6b3b8bd7d003c1fd7f63bd0cb7b0386aafdeb71825dbfdea5ebb76f594dca8865d93e350b621d8506f7fa8d4bb2db5e5055e6e SHA512 d93a6c6064af04b1562e67e207c187c31bdb05b7a23808a9e31557a09c445f9ba7ad449d4893c98b031876fa5ae8dc3542f6db12cf898b820bee8c31f16b60fd +EBUILD salt-2018.3.2.ebuild 4905 BLAKE2B dc24d8c71e442b803a22190ccc3987f3fe4d8c79be3b283ed9d453e8d05a1db4ad483b283a9b39d9886cb076c58efa906e6fae8289091f9ad3916d42125d3128 SHA512 bdaf27fec5d8b3267b22bfd887939397efa36e43d59b7605f8a0a76c606005606eb459c43b0cba37cf6d4f4c67fabf8ea24fce92a4bed0aa786a6fcbceeeac30 +MISC metadata.xml 2288 BLAKE2B dbe7f76af8cd8a97d852536684e914e3759bd1f17e4bdea3c8c16da7c6485eee08151a8d4e41919c1ae89ba4f786783f899e23147159a4bade0009c7a668f741 SHA512 fdcea2f80fc87ab2a0db1643d71dd6d54e91d898594570af6a7505343c5d9a5a0ce4803d11460d7d3f6f533509b072819f958cbe31ca9183fabf811982526969 diff --git a/app-admin/salt/files/api-confd-1 b/app-admin/salt/files/api-confd-1 new file mode 100644 index 000000000000..c70e8e766da0 --- /dev/null +++ b/app-admin/salt/files/api-confd-1 @@ -0,0 +1,5 @@ +# /etc/conf.d/salt-master: config file for /etc/init.d/salt-master + +# see man pages for salt-minion or run `salt-master --help` +# for valid cmdline options +SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/api-initd-4 b/app-admin/salt/files/api-initd-4 new file mode 100644 index 000000000000..a0cb8265047d --- /dev/null +++ b/app-admin/salt/files/api-initd-4 @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-api" +command_args="${SALT_OPTS}" +command_background="1" +pidfile="/var/run/salt-api.pid" +name="SALT API daemon" +retry="20" + +depend() { + use net logger +} diff --git a/app-admin/salt/files/master-confd-1 b/app-admin/salt/files/master-confd-1 new file mode 100644 index 000000000000..c70e8e766da0 --- /dev/null +++ b/app-admin/salt/files/master-confd-1 @@ -0,0 +1,5 @@ +# /etc/conf.d/salt-master: config file for /etc/init.d/salt-master + +# see man pages for salt-minion or run `salt-master --help` +# for valid cmdline options +SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/master-initd-4 b/app-admin/salt/files/master-initd-4 new file mode 100644 index 000000000000..e07e72b0dae7 --- /dev/null +++ b/app-admin/salt/files/master-initd-4 @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-master" +command_args="${SALT_OPTS}" +command_background="1" +pidfile="/var/run/salt-master.pid" +name="SALT master daemon" +retry="20" + +depend() { + use net logger +} diff --git a/app-admin/salt/files/minion-confd-1 b/app-admin/salt/files/minion-confd-1 new file mode 100644 index 000000000000..d69d83fcd60d --- /dev/null +++ b/app-admin/salt/files/minion-confd-1 @@ -0,0 +1,5 @@ +# /etc/conf.d/salt-minion: config file for /etc/init.d/salt-minion + +# see man pages for salt-minion or run `salt-minion --help` +# for valid cmdline options +SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/minion-initd-4 b/app-admin/salt/files/minion-initd-4 new file mode 100644 index 000000000000..c658ccf5c1df --- /dev/null +++ b/app-admin/salt/files/minion-initd-4 @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-minion" +command_args="${SALT_OPTS}" +command_background="1" +pidfile="/var/run/salt-minion.pid" +name="SALT minion daemon" +retry="20" + +depend() { + need net + use logger +} diff --git a/app-admin/salt/files/salt-2016.11.0-broken-tests.patch b/app-admin/salt/files/salt-2016.11.0-broken-tests.patch new file mode 100644 index 000000000000..5bb7a8e4c46b --- /dev/null +++ b/app-admin/salt/files/salt-2016.11.0-broken-tests.patch @@ -0,0 +1,23 @@ +diff --git a/tests/unit/utils/extend_test.py b/tests/unit/utils/extend_test.py +index f63a4896f7..54bf443d9a 100644 +--- a/tests/unit/utils/extend_test.py ++++ b/tests/unit/utils/extend_test.py +@@ -38,18 +38,6 @@ class ExtendTestCase(TestCase): + shutil.rmtree(self.out, True) + os.chdir(self.starting_dir) + +- @patch('sys.exit', MagicMock) +- def test_run(self): +- out = salt.utils.extend.run('test', 'test', 'this description', integration.CODE_DIR, False) +- self.out = out +- year = date.today().strftime('%Y') +- self.assertTrue(os.path.exists(out)) +- self.assertFalse(os.path.exists(os.path.join(out, 'template.yml'))) +- self.assertTrue(os.path.exists(os.path.join(out, 'directory'))) +- self.assertTrue(os.path.exists(os.path.join(out, 'directory', 'test.py'))) +- with salt.utils.fopen(os.path.join(out, 'directory', 'test.py'), 'r') as test_f: +- self.assertEqual(test_f.read(), year) +- + if __name__ == '__main__': + from unit import run_tests + run_tests(ExtendTestCase, needs_daemon=False) diff --git a/app-admin/salt/files/salt-2016.11.0-remove-file-tree-test.patch b/app-admin/salt/files/salt-2016.11.0-remove-file-tree-test.patch new file mode 100644 index 000000000000..47d3257df671 --- /dev/null +++ b/app-admin/salt/files/salt-2016.11.0-remove-file-tree-test.patch @@ -0,0 +1,34 @@ +diff --git a/tests/unit/modules/inspect_collector_test.py b/tests/unit/modules/inspect_collector_test.py +index 9105670526..e077bc3f44 100644 +--- a/tests/unit/modules/inspect_collector_test.py ++++ b/tests/unit/modules/inspect_collector_test.py +@@ -52,29 +52,6 @@ class InspectorCollectorTestCase(TestCase): + self.assertEqual(inspector.pidfile, '/foo/pid/bar.pid') + + @patch("os.mkdir", MagicMock()) +- def test_file_tree(self): +- ''' +- Test file tree. +- +- :return: +- ''' +- +- inspector = Inspector(cachedir='/test', piddir='/test', pidfilename='bar.pid') +- tree_root = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'inspectlib', 'tree_test') +- expected_tree = (['/a/a/dummy.a', '/a/b/dummy.b', '/b/b.1', '/b/b.2', '/b/b.3'], +- ['/a', '/a/a', '/a/b', '/a/c', '/b', '/c'], +- ['/a/a/dummy.ln.a', '/a/b/dummy.ln.b', '/a/c/b.1', '/b/b.4', +- '/b/b.5', '/c/b.1', '/c/b.2', '/c/b.3']) +- tree_result = [] +- for chunk in inspector._get_all_files(tree_root): +- buff = [] +- for pth in chunk: +- buff.append(pth.replace(tree_root, '')) +- tree_result.append(buff) +- tree_result = tuple(tree_result) +- self.assertEqual(expected_tree, tree_result) +- +- @patch("os.mkdir", MagicMock()) + def test_get_unmanaged_files(self): + ''' + Test get_unmanaged_files. diff --git a/app-admin/salt/files/salt-2016.11.0-tmpdir.patch b/app-admin/salt/files/salt-2016.11.0-tmpdir.patch new file mode 100644 index 000000000000..1cccb158aff0 --- /dev/null +++ b/app-admin/salt/files/salt-2016.11.0-tmpdir.patch @@ -0,0 +1,34 @@ +diff --git a/tests/unit/modules/qemu_nbd_test.py b/tests/unit/modules/qemu_nbd_test.py +index 615e6b5670..fbd24aab86 100644 +--- a/tests/unit/modules/qemu_nbd_test.py ++++ b/tests/unit/modules/qemu_nbd_test.py +@@ -77,6 +77,7 @@ class QemuNbdTestCase(TestCase): + Test if it mount the named image via qemu-nbd + and return the mounted roots + ''' ++ tmpdir = os.environ.get('TMPDIR', '/tmp') + mock = MagicMock(return_value=True) + with patch.dict(qemu_nbd.__salt__, {'cmd.run': mock}): + self.assertEqual(qemu_nbd.init('/srv/image.qcow2'), '') +@@ -89,7 +90,7 @@ class QemuNbdTestCase(TestCase): + 'mount.mount': mock, + 'cmd.retcode': MagicMock(side_effect=[1, 0])}): + self.assertDictEqual(qemu_nbd.init('/srv/image.qcow2'), +- {'/tmp/nbd/nbd0/nbd0': '/dev/nbd0'}) ++ {os.path.join(tmpdir, 'nbd/nbd0/nbd0'): '/dev/nbd0'}) + + # 'clear' function tests: 1 + +diff --git a/tests/unit/utils/context_test.py b/tests/unit/utils/context_test.py +index 5249d56747..a27ee9ab61 100644 +--- a/tests/unit/utils/context_test.py ++++ b/tests/unit/utils/context_test.py +@@ -18,7 +18,7 @@ import salt.payload + import salt.utils + + __context__ = {'a': 'b'} +-__opts__ = {'cachedir': '/tmp'} ++__opts__ = {'cachedir': os.environ.get('TMPDIR', '/tmp')} + + + @skipIf(NO_MOCK, NO_MOCK_REASON) diff --git a/app-admin/salt/files/salt-2016.3.1-dont-realpath-tmpdir.patch b/app-admin/salt/files/salt-2016.3.1-dont-realpath-tmpdir.patch new file mode 100644 index 000000000000..3e4fa31c9042 --- /dev/null +++ b/app-admin/salt/files/salt-2016.3.1-dont-realpath-tmpdir.patch @@ -0,0 +1,18 @@ +diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py +index fc13bb6..6316fb5 100644 +--- a/tests/integration/__init__.py ++++ b/tests/integration/__init__.py +@@ -77,12 +77,7 @@ if salt.utils.is_windows(): + import win32api + + +-SYS_TMP_DIR = os.path.realpath( +- # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long +- # for unix sockets: ``error: AF_UNIX path too long`` +- # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR} +- os.environ.get('TMPDIR', tempfile.gettempdir()) if not salt.utils.is_darwin() else '/tmp' +-) ++SYS_TMP_DIR = os.environ.get('TMPDIR', tempfile.gettempdir()) if not salt.utils.is_darwin() else '/tmp' + TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir') + FILES = os.path.join(INTEGRATION_TEST_DIR, 'files') + PYEXEC = 'python{0}.{1}'.format(*sys.version_info) diff --git a/app-admin/salt/files/salt-2016.3.4-test-nonexist-dirs.patch b/app-admin/salt/files/salt-2016.3.4-test-nonexist-dirs.patch new file mode 100644 index 000000000000..dd542d630adf --- /dev/null +++ b/app-admin/salt/files/salt-2016.3.4-test-nonexist-dirs.patch @@ -0,0 +1,32 @@ +diff --git a/tests/unit/conf_test.py b/tests/unit/conf_test.py +index cce0023423..c1324f4a61 100644 +--- a/tests/unit/conf_test.py ++++ b/tests/unit/conf_test.py +@@ -140,6 +140,8 @@ class ConfTest(TestCase): + commented out. This test loops through all of the files in that directory to check + for any lines that are not commented or blank. + ''' ++ if not os.path.exists(SAMPLE_CONF_DIR + 'cloud.profiles.d/'): ++ return + cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.profiles.d/') + for conf_file in cloud_sample_files: + profile_conf = SAMPLE_CONF_DIR + 'cloud.profiles.d/' + conf_file +@@ -158,6 +160,8 @@ class ConfTest(TestCase): + commented out. This test loops through all of the files in that directory to check + for any lines that are not commented or blank. + ''' ++ if not os.path.exists(SAMPLE_CONF_DIR + 'cloud.providers.d/'): ++ return + cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.providers.d/') + for conf_file in cloud_sample_files: + provider_conf = SAMPLE_CONF_DIR + 'cloud.providers.d/' + conf_file +@@ -176,6 +180,9 @@ class ConfTest(TestCase): + commented out. This test loops through all of the files in that directory to check + for any lines that are not commented or blank. + ''' ++ if not os.path.exists(SAMPLE_CONF_DIR + 'cloud.maps.d/'): ++ return ++ + cloud_sample_files = os.listdir(SAMPLE_CONF_DIR + 'cloud.maps.d/') + for conf_file in cloud_sample_files: + map_conf = SAMPLE_CONF_DIR + 'cloud.maps.d/' + conf_file diff --git a/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch b/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch new file mode 100644 index 000000000000..90a48a662998 --- /dev/null +++ b/app-admin/salt/files/salt-2017.7.0-dont-realpath-tmpdir.patch @@ -0,0 +1,19 @@ +diff --git a/tests/support/paths.py b/tests/support/paths.py +index da93c8e1e3..895c636fef 100644 +--- a/tests/support/paths.py ++++ b/tests/support/paths.py +@@ -40,12 +40,12 @@ if CODE_DIR not in sys.path: + if TESTS_DIR not in sys.path: + sys.path.insert(1, TESTS_DIR) + +-SYS_TMP_DIR = os.path.abspath(os.path.realpath( ++SYS_TMP_DIR = os.path.abspath( + # Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long + # for unix sockets: ``error: AF_UNIX path too long`` + # Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR} + os.environ.get('TMPDIR', tempfile.gettempdir()) if not sys.platform.startswith('darwin') else '/tmp' +-)) ++) + TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir') + FILES = os.path.join(INTEGRATION_TEST_DIR, 'files') + PYEXEC = 'python{0}.{1}'.format(*sys.version_info) diff --git a/app-admin/salt/files/salt-2017.7.3-tests.patch b/app-admin/salt/files/salt-2017.7.3-tests.patch new file mode 100644 index 000000000000..9399bf873349 --- /dev/null +++ b/app-admin/salt/files/salt-2017.7.3-tests.patch @@ -0,0 +1,66 @@ +diff --git a/tests/unit/fileserver/test_roots.py b/tests/unit/fileserver/test_roots.py +index cc9c8dbce9..a50a240c25 100644 +--- a/tests/unit/fileserver/test_roots.py ++++ b/tests/unit/fileserver/test_roots.py +@@ -164,12 +164,6 @@ class RootsTest(TestCase, AdaptedConfigurationTestCaseMixin, LoaderModuleMockMix + ret = roots.dir_list({'saltenv': 'base'}) + self.assertIn('empty_dir', ret) + +- def test_symlink_list(self): +- if self.test_symlink_list_file_roots: +- self.opts['file_roots'] = self.test_symlink_list_file_roots +- ret = roots.symlink_list({'saltenv': 'base'}) +- self.assertDictEqual(ret, {'dest_sym': 'source_sym'}) +- + + class RootsLimitTraversalTest(TestCase, AdaptedConfigurationTestCaseMixin): + +diff --git a/tests/unit/modules/test_inspect_collector.py b/tests/unit/modules/test_inspect_collector.py +index 0d37519a9e..c18be8d592 100644 +--- a/tests/unit/modules/test_inspect_collector.py ++++ b/tests/unit/modules/test_inspect_collector.py +@@ -59,44 +59,6 @@ class InspectorCollectorTestCase(TestCase): + inspector.pidfile, + os.sep + os.sep.join(['foo', 'pid', 'bar.pid'])) + +- def test_file_tree(self): +- ''' +- Test file tree. +- +- :return: +- ''' +- +- inspector = Inspector(cachedir=os.sep + 'test', +- piddir=os.sep + 'test', +- pidfilename='bar.pid') +- tree_root = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'inspectlib', 'tree_test') +- expected_tree = ([os.sep + os.sep.join(['a', 'a', 'dummy.a']), +- os.sep + os.sep.join(['a', 'b', 'dummy.b']), +- os.sep + os.sep.join(['b', 'b.1']), +- os.sep + os.sep.join(['b', 'b.2']), +- os.sep + os.sep.join(['b', 'b.3'])], +- [os.sep + 'a', +- os.sep + os.sep.join(['a', 'a']), +- os.sep + os.sep.join(['a', 'b']), +- os.sep + os.sep.join(['a', 'c']), +- os.sep + 'b', +- os.sep + 'c'], +- [os.sep + os.sep.join(['a', 'a', 'dummy.ln.a']), +- os.sep + os.sep.join(['a', 'b', 'dummy.ln.b']), +- os.sep + os.sep.join(['a', 'c', 'b.1']), +- os.sep + os.sep.join(['b', 'b.4']), +- os.sep + os.sep.join(['b', 'b.5']), +- os.sep + os.sep.join(['c', 'b.1']), +- os.sep + os.sep.join(['c', 'b.2']), +- os.sep + os.sep.join(['c', 'b.3'])]) +- tree_result = [] +- for chunk in inspector._get_all_files(tree_root): +- buff = [] +- for pth in chunk: +- buff.append(pth.replace(tree_root, '')) +- tree_result.append(buff) +- tree_result = tuple(tree_result) +- self.assertEqual(expected_tree, tree_result) + + def test_get_unmanaged_files(self): + ''' diff --git a/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch b/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch new file mode 100644 index 000000000000..7b94fafd447d --- /dev/null +++ b/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch @@ -0,0 +1,79 @@ +diff --git a/tests/unit/transport/test_zeromq.py b/tests/unit/transport/test_zeromq.py +index ccb337462e..97d2962e5e 100644 +--- a/tests/unit/transport/test_zeromq.py ++++ b/tests/unit/transport/test_zeromq.py +@@ -45,6 +45,10 @@ ON_SUSE = False + if 'SuSE' in linux_distribution(full_distribution_name=False): + ON_SUSE = True + ++ON_GENTOO = False ++if 'Gentoo' in linux_distribution(full_distribution_name=False): ++ ON_GENTOO = True ++ + + class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin): + ''' +@@ -122,63 +126,6 @@ class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin): + return payload, {'fun': 'send_clear'} + + +-class ClearReqTestCases(BaseZMQReqCase, ReqChannelMixin): +- ''' +- Test all of the clear msg stuff +- ''' +- def setUp(self): +- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config, crypt='clear') +- +- def tearDown(self): +- del self.channel +- +- @classmethod +- @tornado.gen.coroutine +- def _handle_payload(cls, payload): +- ''' +- TODO: something besides echo +- ''' +- raise tornado.gen.Return((payload, {'fun': 'send_clear'})) +- +- +-@flaky +-@skipIf(ON_SUSE, 'Skipping until https://github.com/saltstack/salt/issues/32902 gets fixed') +-class AESReqTestCases(BaseZMQReqCase, ReqChannelMixin): +- def setUp(self): +- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config) +- +- def tearDown(self): +- del self.channel +- +- @classmethod +- @tornado.gen.coroutine +- def _handle_payload(cls, payload): +- ''' +- TODO: something besides echo +- ''' +- raise tornado.gen.Return((payload, {'fun': 'send'})) +- +- # TODO: make failed returns have a specific framing so we can raise the same exception +- # on encrypted channels +- # +- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +- # +- # WARNING: This test will fail randomly on any system with > 1 CPU core!!! +- # +- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +- def test_badload(self): +- ''' +- Test a variety of bad requests, make sure that we get some sort of error +- ''' +- # TODO: This test should be re-enabled when Jenkins moves to C7. +- # Once the version of salt-testing is increased to something newer than the September +- # release of salt-testing, the @flaky decorator should be applied to this test. +- msgs = ['', [], tuple()] +- for msg in msgs: +- with self.assertRaises(salt.exceptions.AuthenticationError): +- ret = self.channel.send(msg, timeout=5) +- +- + class BaseZMQPubCase(AsyncTestCase, AdaptedConfigurationTestCaseMixin): + ''' + Test the req server/client pair diff --git a/app-admin/salt/files/salt-api.service b/app-admin/salt/files/salt-api.service new file mode 100644 index 000000000000..fd9f665fff09 --- /dev/null +++ b/app-admin/salt/files/salt-api.service @@ -0,0 +1,10 @@ +[Unit] +Description=The Salt Master Server +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/bin/salt-api + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/salt/files/salt-master.service b/app-admin/salt/files/salt-master.service new file mode 100644 index 000000000000..4f3827ede6df --- /dev/null +++ b/app-admin/salt/files/salt-master.service @@ -0,0 +1,10 @@ +[Unit] +Description=The Salt Master Server +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/bin/salt-master + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/salt/files/salt-minion.service b/app-admin/salt/files/salt-minion.service new file mode 100644 index 000000000000..2f199f998eca --- /dev/null +++ b/app-admin/salt/files/salt-minion.service @@ -0,0 +1,10 @@ +[Unit] +Description=The Salt Minion +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/bin/salt-minion + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/salt/files/salt-syndic.service b/app-admin/salt/files/salt-syndic.service new file mode 100644 index 000000000000..922eef35af8b --- /dev/null +++ b/app-admin/salt/files/salt-syndic.service @@ -0,0 +1,10 @@ +[Unit] +Description=The Salt Master Server +After=syslog.target network.target + +[Service] +Type=simple +ExecStart=/usr/bin/salt-syndic + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/salt/files/syndic-confd-1 b/app-admin/salt/files/syndic-confd-1 new file mode 100644 index 000000000000..d69d83fcd60d --- /dev/null +++ b/app-admin/salt/files/syndic-confd-1 @@ -0,0 +1,5 @@ +# /etc/conf.d/salt-minion: config file for /etc/init.d/salt-minion + +# see man pages for salt-minion or run `salt-minion --help` +# for valid cmdline options +SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/syndic-initd-4 b/app-admin/salt/files/syndic-initd-4 new file mode 100644 index 000000000000..8908f2cfa850 --- /dev/null +++ b/app-admin/salt/files/syndic-initd-4 @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-syndic" +command_args="${SALT_OPTS}" +command_background="1" +pidfile="/var/run/salt-syndic.pid" +name="SALT syndic daemon" +retry="20" + +depend() { + use net logger +} diff --git a/app-admin/salt/metadata.xml b/app-admin/salt/metadata.xml new file mode 100644 index 000000000000..00b55f2c20e0 --- /dev/null +++ b/app-admin/salt/metadata.xml @@ -0,0 +1,44 @@ + + + + + chutzpah@gentoo.org + Patrick McLean + + +Salt is a powerful remote execution manager that can be used to administer +servers in a fast and efficient way. + +Salt allows commands to be executed across large groups of servers. This means +systems can be easily managed, but data can also be easily gathered. Quick +introspection into running systems becomes a reality. + +Remote execution is usually used to set up a certain state on a remote system. +Salt addresses this problem as well, the salt state system uses salt state +files to define the state a server needs to be in. + +Between the remote execution system, and state management Salt addresses the +backbone of cloud and data center management. + + + Enable support for using cherrypy. + Enable salt-cloud support via libcloud. + Support managing virtual machines with app-emulation/libvirt. + Enable support for gnupg via python-gnupg. + Enable support for keyrings via python-keyring. + Add support for using the mako template engine for parsing salt states. + Support returning data to a mongodb server. + Support the OpenStack neutron network service. + Enable support for the OpenStack Nova API + Add support for using TLS via OpenSSL. + Add support for package state enforcement using sys-apps/portage + Add support for the new RAET transport. + Support returning data to a redis database. + Use timelib to parse english textual date descriptions. + Add support for the zeromq transport. + + + salt + saltstack/salt-vim + + diff --git a/app-admin/salt/salt-2016.11.9-r2.ebuild b/app-admin/salt/salt-2016.11.9-r2.ebuild new file mode 100644 index 000000000000..7647ba045387 --- /dev/null +++ b/app-admin/salt/salt-2016.11.9-r2.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd distutils-r1 + +DESCRIPTION="Salt is a remote execution and configuration manager" +HOMEPAGE="https://saltstack.com/community/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/${PN}stack/${PN}.git" + EGIT_BRANCH="develop" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~x86 ~amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova" +IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax" + +RDEPEND="sys-apps/pciutils + dev-python/jinja[${PYTHON_USEDEP}] + >=dev-python/msgpack-0.3[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/markupsafe[${PYTHON_USEDEP}] + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}] + libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) + mako? ( dev-python/mako[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] ) + openssl? ( + dev-libs/openssl:*[-bindist] + dev-python/pyopenssl[${PYTHON_USEDEP}] + ) + raet? ( + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}] + ) + zeromq? ( + >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] + || ( + dev-python/pycryptodome[${PYTHON_USEDEP}] + >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}] + ) + ) + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) + portage? ( sys-apps/portage[${PYTHON_USEDEP}] ) + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-salt ) + timelib? ( dev-python/timelib[${PYTHON_USEDEP}] ) + nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] ) + neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] ) + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) + profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) + vim-syntax? ( app-vim/salt-vim )" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/timelib[${PYTHON_USEDEP}] + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] + !x86? ( dev-python/boto3[${PYTHON_USEDEP}] ) + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}] + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] + ${RDEPEND} + )" + +DOCS=( README.rst AUTHORS ) + +REQUIRED_USE="|| ( raet zeromq )" +RESTRICT="x86? ( test )" + +PATCHES=( + "${FILESDIR}/${PN}-2016.11.0-tmpdir.patch" + "${FILESDIR}/${PN}-2016.3.1-dont-realpath-tmpdir.patch" + "${FILESDIR}/${PN}-2016.3.4-test-nonexist-dirs.patch" + "${FILESDIR}/${PN}-2016.11.0-remove-file-tree-test.patch" + "${FILESDIR}/${PN}-2016.11.0-broken-tests.patch" +) + +python_prepare() { + # this test fails because it trys to "pip install distribute" + rm tests/unit/{modules,states}/zcbuildout_test.py \ + tests/unit/modules/{rh_ip,win_network,random_org}_test.py || die + rm tests/unit/states/pip_test.py || die + + # https://github.com/saltstack/salt/issues/39095 + rm tests/unit/utils/parsers_test.py + + # apparently libcloud does not know about this? + rm tests/unit/cloud/clouds/dimensiondata_test.py || die + + # seriously? "ValueError: Missing (or not readable) key file: '/home/dany/PRIVKEY.pem'" + rm tests/unit/cloud/clouds/gce_test.py || die + + # allow the use of the renamed msgpack + sed -i '/^msgpack/d' requirements/base.txt || die +} + +python_install_all() { + local svc + USE_SETUPTOOLS=1 distutils-r1_python_install_all + + for svc in minion master syndic api; do + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc} + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} + systemd_dounit "${FILESDIR}"/salt-${svc}.service + done + + insinto /etc/${PN} + doins -r conf/* +} + +python_test() { + local tempdir + # testsuite likes lots of files + ulimit -n 3072 || die + + # ${T} is too long a path for the tests to work + tempdir="$(mktemp -dup /tmp salt-XXX)" + mkdir "${T}/$(basename "${tempdir}")" + + ( + cleanup() { rm -f "${tempdir}"; } + trap cleanup EXIT + + addwrite "${tempdir}" + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" + + USE_SETUPTOOLS=1 SHELL="/bin/bash" \ + TMPDIR="${tempdir}" \ + ${EPYTHON} tests/runtests.py \ + --unit-tests --no-report --verbose + + ) || die "testing failed" +} diff --git a/app-admin/salt/salt-2017.7.7.ebuild b/app-admin/salt/salt-2017.7.7.ebuild new file mode 100644 index 000000000000..bb76353c1a4d --- /dev/null +++ b/app-admin/salt/salt-2017.7.7.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit eutils systemd distutils-r1 + +DESCRIPTION="Salt is a remote execution and configuration manager" +HOMEPAGE="http://saltstack.org/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" + EGIT_BRANCH="develop" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~x86 ~amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova" +IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax" + +RDEPEND="sys-apps/pciutils + dev-python/jinja[${PYTHON_USEDEP}] + >=dev-python/msgpack-0.3[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/markupsafe[${PYTHON_USEDEP}] + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}] + =dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) + mako? ( dev-python/mako[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] ) + openssl? ( + dev-libs/openssl:*[-bindist] + dev-python/pyopenssl[${PYTHON_USEDEP}] + ) + raet? ( + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}] + ) + zeromq? ( + >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] + dev-python/pycryptodome[${PYTHON_USEDEP}] + ) + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) + portage? ( + || ( + sys-apps/portage[${PYTHON_USEDEP}] + sys-apps/portage-mgorny[${PYTHON_USEDEP}] + ) + ) + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-salt ) + timelib? ( dev-python/timelib[${PYTHON_USEDEP}] ) + nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] ) + neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] ) + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) + profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) + vim-syntax? ( app-vim/salt-vim )" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/pytest-salt[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + dev-python/timelib[${PYTHON_USEDEP}] + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] ) + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}] + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] + ${RDEPEND} + )" + +DOCS=( README.rst AUTHORS ) + +REQUIRED_USE="|| ( raet zeromq )" +RESTRICT="x86? ( test )" + +PATCHES=( + "${FILESDIR}/${PN}-2017.7.0-dont-realpath-tmpdir.patch" + "${FILESDIR}/${PN}-2017.7.3-tests.patch" +) + +python_prepare() { + rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die + rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die + rm tests/unit/states/test_boto_vpc.py || die + rm tests/unit/modules/test_kubernetes.py || die + # allow the use of the renamed msgpack + sed -i '/^msgpack/d' requirements/base.txt || die +} + +python_install_all() { + local svc + USE_SETUPTOOLS=1 distutils-r1_python_install_all + + for svc in minion master syndic api; do + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc} + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} + systemd_dounit "${FILESDIR}"/salt-${svc}.service + done + + insinto /etc/${PN} + doins -r conf/* +} + +python_test() { + local tempdir + # testsuite likes lots of files + ulimit -n 3072 || die + + # ${T} is too long a path for the tests to work + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" + mkdir "${T}/$(basename "${tempdir}")" + mkdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die + + ( + cleanup() { + rm -f "${tempdir}" + rmdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die + } + + trap cleanup EXIT + + addwrite "${tempdir}" + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" + + USE_SETUPTOOLS=1 SHELL="/bin/bash" \ + TMPDIR="${tempdir}" \ + ${EPYTHON} tests/runtests.py \ + --unit-tests --no-report --verbose + + ) || die "testing failed" +} diff --git a/app-admin/salt/salt-2018.3.2.ebuild b/app-admin/salt/salt-2018.3.2.ebuild new file mode 100644 index 000000000000..fff0c84f2aca --- /dev/null +++ b/app-admin/salt/salt-2018.3.2.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 python3_6 ) + +inherit eutils systemd distutils-r1 + +DESCRIPTION="Salt is a remote execution and configuration manager" +HOMEPAGE="http://saltstack.org/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" + EGIT_BRANCH="develop" + SRC_URI="" + KEYWORDS="" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~x86 ~amd64" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova" +IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax" + +RDEPEND="sys-apps/pciutils + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/libnacl[${PYTHON_USEDEP}] + >=dev-python/msgpack-0.3[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/markupsafe[${PYTHON_USEDEP}] + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}] + =dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) + mako? ( dev-python/mako[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] ) + openssl? ( + dev-libs/openssl:*[-bindist] + dev-python/pyopenssl[${PYTHON_USEDEP}] + ) + raet? ( + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}] + ) + zeromq? ( + >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] + dev-python/pycryptodome[${PYTHON_USEDEP}] + ) + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) + portage? ( + || ( + sys-apps/portage[${PYTHON_USEDEP}] + sys-apps/portage-mgorny[${PYTHON_USEDEP}] + ) + ) + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysql-python[$(python_gen_usedep 'python2*')] ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-salt ) + timelib? ( dev-python/timelib[$(python_gen_usedep 'python2*')] ) + nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] ) + neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] ) + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) + profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) + vim-syntax? ( app-vim/salt-vim )" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/pytest-salt[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-catchlog[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + dev-python/timelib[$(python_gen_usedep 'python2*')] + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] ) + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}] + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] + ${RDEPEND} + )" + +DOCS=( README.rst AUTHORS ) + +REQUIRED_USE="|| ( raet zeromq )" +RESTRICT="x86? ( test )" + +PATCHES=( + "${FILESDIR}/${PN}-2017.7.0-dont-realpath-tmpdir.patch" + "${FILESDIR}/${PN}-2017.7.3-tests.patch" + "${FILESDIR}/${PN}-2018.3.2-skip-zeromq-test-that-hangs.patch" +) + +python_prepare() { + # remove tests with external dependencies that may not be available + rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die + rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die + rm tests/unit/states/test_boto_vpc.py || die + rm tests/unit/modules/test_{kubernetes,vsphere}.py || die + + # allow the use of the renamed msgpack + sed -i '/^msgpack/d' requirements/base.txt || die +} + +python_install_all() { + local svc + USE_SETUPTOOLS=1 distutils-r1_python_install_all + + for svc in minion master syndic api; do + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc} + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} + systemd_dounit "${FILESDIR}"/salt-${svc}.service + done + + insinto /etc/${PN} + doins -r conf/* +} + +python_test() { + local tempdir + # testsuite likes lots of files + ulimit -n 3072 || die + + # ${T} is too long a path for the tests to work + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" + mkdir "${T}/$(basename "${tempdir}")" + mkdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die + + ( + cleanup() { + rm -f "${tempdir}" + rmdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die + } + + trap cleanup EXIT + + addwrite "${tempdir}" + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" + + USE_SETUPTOOLS=1 SHELL="/bin/bash" \ + TMPDIR="${tempdir}" \ + ${EPYTHON} tests/runtests.py \ + --unit-tests --no-report --verbose + + ) || die "testing failed" +} -- cgit v1.2.3