diff options
Diffstat (limited to 'app-admin/salt')
-rw-r--r-- | app-admin/salt/Manifest | 9 | ||||
-rw-r--r-- | app-admin/salt/files/api-confd-1 | 4 | ||||
-rw-r--r-- | app-admin/salt/files/api-initd-5 | 18 | ||||
-rw-r--r-- | app-admin/salt/files/master-initd-5 | 18 | ||||
-rw-r--r-- | app-admin/salt/files/minion-initd-5 | 19 | ||||
-rw-r--r-- | app-admin/salt/files/syndic-confd-1 | 4 | ||||
-rw-r--r-- | app-admin/salt/files/syndic-initd-5 | 18 | ||||
-rw-r--r-- | app-admin/salt/salt-3002.2-r3.ebuild | 185 |
8 files changed, 269 insertions, 6 deletions
diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest index c011cb8d3e1c..c35a7264c5b6 100644 --- a/app-admin/salt/Manifest +++ b/app-admin/salt/Manifest @@ -1,9 +1,12 @@ -AUX api-confd-1 188 BLAKE2B 8ac416a7ff64c73556f07a08268ea7d91547e242becd345ac35da7b64f6b2e4aba276e8920e7353bd2caeaffa3034349496b00622191793994bbd4d25faa3c3c SHA512 c58fc025a3654b59f79c6e23fe135d75ebad8b166bc5214f4842c3dd92192e3598480f9fd6960ad2dc36d3ee45ff971650c5e0156353c1c045650f86c9a68db9 +AUX api-confd-1 179 BLAKE2B d014cadfb5dd99c85b1dee0e743f413fc5d6eb05629045bad5df108e6e96104b3b4f5e3736518baff5473c68d94906bb90cb7fe8167e136dd6603eb1087cc01c SHA512 de1d70050c2f911abb306c1b2253f2fdaac505a5ddd34937d7bef9dc9b876e9c6ed06e330a816fcafa38feaf67837235e78f2d97d149fef9fe20a29d945f8f22 AUX api-initd-4 302 BLAKE2B 385e678ea2fe06f413e68a3812350df823318a2807805373377e747c3a82e524af114aeccab8a6e6e36b1419a3e0a6bf025749db585483906487767e76274376 SHA512 098fb6e1ba83270abd31f9cc3afdc159149276962fcf73ce0ae943df87ec26d0883990652614cdeef48912778780731f91efc972a22a75c4b10f3bd79a251a90 +AUX api-initd-5 483 BLAKE2B 6ebe3d0c7511849c6e0dcea55303eac0684d70d660013d8fdcaa6630b5370faff7d07ec6a302b2dad5c4b0c5ade4752d87dd22da47d196178b414515ef53d6ed SHA512 b0afec231ef08bb55634aa994ea5e8b5024a0991125ec51cfd92b6d64cc5e09a0f881f49571db8a7947d9dfe2c09e4ffb8438f4c9c93d972def1631d83e9bbf1 AUX master-confd-1 188 BLAKE2B 8ac416a7ff64c73556f07a08268ea7d91547e242becd345ac35da7b64f6b2e4aba276e8920e7353bd2caeaffa3034349496b00622191793994bbd4d25faa3c3c SHA512 c58fc025a3654b59f79c6e23fe135d75ebad8b166bc5214f4842c3dd92192e3598480f9fd6960ad2dc36d3ee45ff971650c5e0156353c1c045650f86c9a68db9 AUX master-initd-4 311 BLAKE2B 302e71b0328d47addd1508e1992ee56c719463d4b99af37b626835fefd28f9c3184e8441035f055992489b1084f1fdd45542466b359c206305e8174fef853478 SHA512 d44ea9fdf962ded6d0c6ac5a1f89ec8729a9a70517ba0f132c54696d32bc96030c64af09f48037867006bd3acdf4b6db759ca873717cd5a88701e42d06885bcc +AUX master-initd-5 498 BLAKE2B dad96866c1146a2c584e00586b160a54b844922c140166402ce7e2d0605ee17e892a4a676177d2fec912813f68dbd2ff6beb87a5a14298c2d77c18b63b172545 SHA512 73eb1238bc5823640627e1776ea688b95d0afd321deaf95271eea33434bc20054944966b159dc5e1c8ec1e1458c6dd29e769729bad570300d5a6eea1c8d18fab AUX minion-confd-1 188 BLAKE2B ad20094c30f9aa573397d347f9fb11acafba2f724b6c836d7ec57f10d4182c300a4b0ec572b5f3301174febdfc69c30752c3b0eabdfdf9f4963b03531db23523 SHA512 0051e13351cef8db81dc075a194bb384723f07d5591b5b4d3f3adf4180afaf7beced470ab79ceca9d1ec0dae62dbd72084eb76af009fc78411a011050a94a2ed AUX minion-initd-4 317 BLAKE2B 4c207bd26a72d5dded38e40f7869f46263272a841b978f138248d016a06e837c3aebebabd15314e3896b404058c3f5dd5e6a1cca48450b07b88b6edef6a8d7d2 SHA512 80790ed1b5f86b713ca6384d60253676b16b10c122810ed07b7119c3860bedfe40102f6b7de86d832f084d84f87bf9405ec282629f981767a534d2a53144845f +AUX minion-initd-5 504 BLAKE2B ff49376d596a49aeec649dffee3029be9b6f85663713a7e3bc03b45aee4ab78f31ef5e3b758078a551113ee1a06369c31fb5ef1acdbb30399be748524cd491fd SHA512 3a35e9cdd1fc7e2691f9d451b384982117f03374d40372ff3efca2b3ddba761dc49660004f4859fcc686513994daea538379584faf2a3b020ff8311a1aba9ee8 AUX salt-2017.7.0-dont-realpath-tmpdir.patch 834 BLAKE2B e70496f3ab18b954e7cacd29dbdee6ccbe0a07f139903360312db247926867a78513cd9022f492ce370eeafcc81bc4db545359036f8f5b0d2d64d3c5bb8aefc0 SHA512 33b69954e8112c0f76654d507df74a4cdd37e8227848f2ce0652b3ecee8b847253ccad33cada0e3dd1471c54c780dcc12d5e546c4ec43868511b95b0c7f71e17 AUX salt-2019.2.0-skip-tests-that-oom-machine.patch 739 BLAKE2B c0e1b18c528ddcdc19e93061112d2c42aeca96f9091218e7ad6b4eadf11255079cecd6b9b9def576c663b4ba794d151db8fc32336b1c29c3da8e9c18c09582f3 SHA512 0bd8fc2ab73be8ffc9fdda65a60c7306dbfa9f76d874994ba09db7ef71678fca80c8fde5963d22b5bbbe3b933140a56f2173f4c109b47dd9e9c3c9a70062b0e3 AUX salt-2019.2.8-ansible-roster-fix.patch 572 BLAKE2B c11106be76626673a0e6365dea7ac8593f420ffa2bc0ca02c24520240d863d69a7f0449f10b5d53f6292c247f434636a0f188338ffa3d81a27abc8db18059c92 SHA512 86a2fc107882855ef60b2722e7282de8e6ad57c5fe6809ff99843f934a193445da599d57d1cbc3d7d3443f93d52a7ba5922c6bd76579f85648f6256ce7a81c66 @@ -19,8 +22,9 @@ AUX salt-api.service 166 BLAKE2B 32d28ef4ef3c60942bed3fa3a01d70a9af387705844326c 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-confd-1 188 BLAKE2B 98f13eb627963d65df26140f348c04eb8c253d444d36ecd1f5ef344ad89901b0a5ed62c64364e90595c2d2ee2766f30802a4a86a2555bbea343ab410292359af SHA512 35fe9bf4732c8a53b47099ffe5f9468d884ec3e2671451a6d52821dde6c70c63176b29ade0d700b99aaf47557f58179f780422843346bd3aa6513d9465ec9f58 AUX syndic-initd-4 311 BLAKE2B aab3b44f65dedb30ea4eb573872c0253e4d7b438a533f22a4e887c1e6487682efce7f5b75d3bcf366ef706a9fb1578dce537ac5b50324239378cecbd0715ad5d SHA512 69cc10fa7d9f0f4a68d223272c08ee33af242a50eb9bbea919d61f6cb5baf1ce986b07d69fc0e47e2f6dffc0a11100c3bc0d836d2938c46aa364beecb47f07ef +AUX syndic-initd-5 498 BLAKE2B f31979e61a2d0f016beefd641cf666cc48d33a14a84f634e6112cdea86db9cb6eac4b312a6f526d38ed0a6e47e09a96a95b03104fac215ce2bac122c06bcbc3b SHA512 11b4332bd1b916b7764ed6b826bdda72192339d90f492e7df5b116e7aa5407129b787bda0a061c48fdb0a53b58558424225e9090b472c5f5cb36189120082459 DIST salt-3000.2-py38-misc.patch.gz 6250 BLAKE2B 68fff80a042e6bf208ea2d9692da7a7b1e29572f1ec3c850c14743bbf2821d231f933ec4e6d6eaad12acee0b7666888a37a72872b2b082c92d8db9de988fbbec SHA512 6d4a66323a423e630f7cc73b566ed96c452c8fc3d72c25a2dd86033c4774c1c8e8b8701e1d4ee92994d4148c398d704f419023e26d8b40c8fdd63f9d79d9d52f DIST salt-3000.5.tar.gz 15229450 BLAKE2B 135e9b9dcc461ac898231ce46e6a1359e6d60a43822320950bc0b83057f768dadf55320dd73df72d5bc917f324eef4661e6f75d8eb8e84aef958bd2df8924cfc SHA512 2579f65c24d22d77132057bd8cf37040d7d149624745dd68b4c44318be786580dcc34bf563f90d7de9ef5b726b2453bef4d8639bc8fbd9c5e691500520335317 DIST salt-3000.6.tar.gz 15236781 BLAKE2B 5a532a6915b331fb532dc6e1651cf8fca3e1a5e9f29f6d75260fdb1162dbfeec755c65f7c6fc28b1cc7dc3ace978547830af31aafc1eee8419bbc7e695725787 SHA512 739e3671766c45a0ef1eb45933c7f00f14586e91f4c4a79cbed913a48961a48baee853206ba569491756e8a872d22f3635eb6bc1a366020e551c567b2334c508 @@ -30,4 +34,5 @@ EBUILD salt-3000.5.ebuild 6321 BLAKE2B ddaa02503b5d8301697bae784a4901348eec72152 EBUILD salt-3000.6.ebuild 6377 BLAKE2B 39cb9ce06b9eed29d75ae8747f780221487565da34475b35659f4f5208910216016a02b1cfd52fe5df7662df20e2741f0028c67f3114b2d8d5833a7bca962b88 SHA512 24ce6c7b9364cb3824c218c8bad4fcc6c103767599e3b0c054391cc908ffc81aacc586039de3855bb5f862fe572971fede0890d79ad755e5bf9c9eaea5edb84d EBUILD salt-3001.4-r1.ebuild 6113 BLAKE2B bf84779e65c8f2017fa00c1f0eebd46d6e4030baa8fab11146000ce9ddc7e07a37d3d69f968b8daadce286cdc26cdcec16cf7a8e10240f5ee105ebaa5053074e SHA512 acfba7757f991cc6d4478c5095f53117878cb57d747eed2c4805dccc40aa8d3f5f5cc1c0a98402403ab649ea3cb77a8562456fccea96c7580ca7b34aa625c200 EBUILD salt-3002.2-r2.ebuild 6149 BLAKE2B 52ba5031eb9949451ab830f29df925cdcd0c140c8c3a68e5f84d9ae66697f8f63306ae3bf61e61ba2510fc305c9e912c258cad030ae49afe01594273153cbb4a SHA512 81cbde2f580d885e2483d31ddfb1336ad58140946057565a5115c718e41c7d66c051af9a02d8931a559f71755e627ce95d226f64c5f8054759304a58f873be68 +EBUILD salt-3002.2-r3.ebuild 6149 BLAKE2B 02eeb59d8a9eb996e653587a44095694afd40a1b19e192e912bb42352f1442aacf1214f4dac2ac22b4d1c998f38df05177c67e1b2b6cc91b70ff351872ffc133 SHA512 07c91e84baa24ccc4c6deed13f3172715ee7fa5e1a1f6b4e5fea2487a20453029f7d63111ca3ae2989f901f541d580e86454cb63352230cb358d5a776e67274d MISC metadata.xml 2361 BLAKE2B 37b7fc2f2981e2f09ecb22804831dbbeaa03d74436df5fd34d65b241330ab760b3618b3e3f497ae81e91714c1b6a4913b1305e49ef157896ef1c1e1a309cae4f SHA512 703ccabd91e0ecb08190f8349ec3588e4effe3ef295ae4e05b1d077399cc4aa52fee5f6a533ad4d29f0cfeac8221878f63fbd2e5af8604ab37ec00a68c940ef5 diff --git a/app-admin/salt/files/api-confd-1 b/app-admin/salt/files/api-confd-1 index c70e8e766da0..84a1c6c71a0e 100644 --- a/app-admin/salt/files/api-confd-1 +++ b/app-admin/salt/files/api-confd-1 @@ -1,5 +1,5 @@ -# /etc/conf.d/salt-master: config file for /etc/init.d/salt-master +# /etc/conf.d/salt-api: config file for /etc/init.d/salt-api -# see man pages for salt-minion or run `salt-master --help` +# see man pages for salt-minion or run `salt-api --help` # for valid cmdline options SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/api-initd-5 b/app-admin/salt/files/api-initd-5 new file mode 100644 index 000000000000..1fecd03275ee --- /dev/null +++ b/app-admin/salt/files/api-initd-5 @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-api" +command_args="${SALT_OPTS}" +pidfile="/var/run/salt-api.pid" +command_args_background="--daemon --pid-file=\"${pidfile}\"" +name="SALT API daemon" +retry="20" + +supervisor=supervise-daemon +output_logger="logger -p daemon.info -t salt-api.stdout --" +error_logger="logger -p daemon.err -t salt-api.error --" + +depend() { + use net logger +} diff --git a/app-admin/salt/files/master-initd-5 b/app-admin/salt/files/master-initd-5 new file mode 100644 index 000000000000..13c8ad892284 --- /dev/null +++ b/app-admin/salt/files/master-initd-5 @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-master" +command_args="${SALT_OPTS}" +command_args_background="--daemon --pid-file=\"${pidfile}\"" +pidfile="/var/run/salt-master.pid" +name="SALT master daemon" +retry="20" + +supervisor=supervise-daemon +output_logger="logger -p daemon.info -t salt-master.stdout --" +error_logger="logger -p daemon.err -t salt-master.error --" + +depend() { + use net logger +} diff --git a/app-admin/salt/files/minion-initd-5 b/app-admin/salt/files/minion-initd-5 new file mode 100644 index 000000000000..e3a430b77fa4 --- /dev/null +++ b/app-admin/salt/files/minion-initd-5 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-minion" +command_args="${SALT_OPTS}" +pidfile="/var/run/salt-minion.pid" +command_args_background="--daemon --pid-file=\"${pidfile}\"" +name="SALT minion daemon" +retry="20" + +supervisor=supervise-daemon +output_logger="logger -p daemon.info -t salt-minion.stdout --" +error_logger="logger -p daemon.err -t salt-minion.error --" + +depend() { + need net + use logger +} diff --git a/app-admin/salt/files/syndic-confd-1 b/app-admin/salt/files/syndic-confd-1 index d69d83fcd60d..e9c75b8bc787 100644 --- a/app-admin/salt/files/syndic-confd-1 +++ b/app-admin/salt/files/syndic-confd-1 @@ -1,5 +1,5 @@ -# /etc/conf.d/salt-minion: config file for /etc/init.d/salt-minion +# /etc/conf.d/salt-syndic: config file for /etc/init.d/salt-syndic -# see man pages for salt-minion or run `salt-minion --help` +# see man pages for salt-minion or run `salt-syndic --help` # for valid cmdline options SALT_OPTS="--log-level=warning" diff --git a/app-admin/salt/files/syndic-initd-5 b/app-admin/salt/files/syndic-initd-5 new file mode 100644 index 000000000000..7e43828bda47 --- /dev/null +++ b/app-admin/salt/files/syndic-initd-5 @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/salt-syndic" +command_args="${SALT_OPTS}" +pidfile="/var/run/salt-syndic.pid" +command_args_background="--daemon --pid-file=\"${pidfile}\"" +name="SALT syndic daemon" +retry="20" + +supervisor=supervise-daemon +output_logger="logger -p daemon.info -t salt-syndic.stdout --" +error_logger="logger -p daemon.err -t salt-syndic.error --" + +depend() { + use net logger +} diff --git a/app-admin/salt/salt-3002.2-r3.ebuild b/app-admin/salt/salt-3002.2-r3.ebuild new file mode 100644 index 000000000000..7c65d1b19803 --- /dev/null +++ b/app-admin/salt/salt-3002.2-r3.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{7..8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +inherit systemd distutils-r1 + +DESCRIPTION="Salt is a remote execution and configuration manager" +HOMEPAGE="https://www.saltstack.com/resources/community/ + https://github.com/saltstack" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" + EGIT_BRANCH="develop" + SRC_URI="" +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako + mongodb neutron nova openssl portage profile redis selinux test raet + +zeromq vim-syntax" + +RDEPEND=" + sys-apps/pciutils + >=dev-python/distro-1.5[${PYTHON_USEDEP}] + dev-python/jinja[${PYTHON_USEDEP}] + dev-python/libnacl[${PYTHON_USEDEP}] + >=dev-python/msgpack-1.0.0[${PYTHON_USEDEP}] + >=dev-python/pycryptodome-3.9.8[${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}] + dev-python/toml[${PYTHON_USEDEP}] + dev-python/watchdog[${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? ( + $(python_gen_cond_dep 'dev-python/libvirt-python[${PYTHON_USEDEP}]' python3_7) + ) + openssl? ( + dev-libs/openssl:0=[-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}] + ) + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) + cheetah? ( dev-python/cheetah3[${PYTHON_USEDEP}] ) + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) + portage? ( sys-apps/portage[${PYTHON_USEDEP}] ) + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) + selinux? ( sec-policy/selinux-salt ) + nova? ( + $(python_gen_cond_dep '>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]' python3_7) + ) + neutron? ( + $(python_gen_cond_dep '>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]' python3_7) + ) + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) + profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) + vim-syntax? ( app-vim/salt-vim ) + zeromq? ( >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] ) +" +BDEPEND=" + test? ( + ${RDEPEND} + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] + >=dev-python/jsonschema-3.0[${PYTHON_USEDEP}] + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] + dev-python/pip[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] + >=dev-python/pytest-salt-factories-0.93.0[${PYTHON_USEDEP}] + dev-python/pytest-tempdir[${PYTHON_USEDEP}] + >=dev-python/virtualenv-20.0.20[${PYTHON_USEDEP}] + !x86? ( >=dev-python/boto3-1.3.15[${PYTHON_USEDEP}] ) + )" + +DOCS=( README.rst AUTHORS ) + +REQUIRED_USE="|| ( raet zeromq ) + test? ( cheetah genshi )" +RESTRICT="!test? ( test ) x86? ( test )" + +PATCHES=( + "${FILESDIR}/salt-2019.2.0-skip-tests-that-oom-machine.patch" + "${FILESDIR}/salt-3002-dont-realpath-on-tmpdir.patch" + "${FILESDIR}/salt-3002-tests.patch" +) + +python_prepare_all() { + # 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_{file,boto_{vpc,secgroup,elb}}.py || die + rm tests/unit/states/test_boto_vpc.py || die + rm tests/support/gitfs.py tests/unit/runners/test_git_pillar.py || die + + # tests that require network access + rm tests/unit/{states,modules}/test_zcbuildout.py || die + + # make sure pkg_resources doesn't bomb because pycrypto isn't installed + # make sure pkg_resources doesn't bomb because pycrypto isn't installed + find "${S}" -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d ; /pycryptodomex/ d' -i || die + # pycryptodome rather than pycryptodomex + find "${S}" -name '*.py' -print0 | xargs -0 -- sed -i -e 's:Cryptodome:Crypto:g' -- || die + + distutils-r1_python_prepare_all +} + +python_prepare() { + einfo "Fixing collections.abc warnings for ${EPYTHON}" + local abc + abc="$("${EPYTHON}" -c 'import collections.abc; print("|".join((c for c in dir(collections.abc) if not c.startswith("_"))))')" || die + find -name '*.py' -type f -print0 | xargs -0 sed -r -e "s:collections\\.(${abc}):collections.abc.\\1:g" -i || 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-5 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}")" + + ( + cleanup() { rm -f "${tempdir}" || die; } + + trap cleanup EXIT + + addwrite "${tempdir}" + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die + + USE_SETUPTOOLS=1 SHELL="/bin/bash" \ + TMPDIR="${tempdir}" \ + ${EPYTHON} tests/runtests.py \ + --unit-tests --no-report --verbose \ + || die "testing failed with ${EPYTHON}" + ) +} + +pkg_postinst() { + if use python_targets_python3_8; then + if use nova; then + ewarn "Salt's nova functionality will not work with python3.8 since" + ewarn "dev-python/python-novaclient does not support it yet" + fi + if use neutron; then + ewarn "Salt's neutron functionality will not work with python3.8 since" + ewarn "dev-python/python-neutronclient does not support it yet" + fi + if use libvirt; then + ewarn "Salt's libvirt functionality will not work with python3.8 since" + ewarn "dev-python/libvirt-python does not support it yet" + fi + fi +} |