From fab849d1daed0ba7f2ac497d07985c3dbb692543 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 16 Jun 2019 21:23:20 +0100 Subject: gentoo resync : 16.06.2019 --- sys-cluster/ceph/Manifest | 4 + sys-cluster/ceph/ceph-13.2.6.ebuild | 341 +++++++++++++++++++++ .../ceph/files/ceph-13.2.6-dpdk-alignment.patch | 14 + .../ceph/files/ceph-13.2.6-no-virtualenvs.patch | 74 +++++ 4 files changed, 433 insertions(+) create mode 100644 sys-cluster/ceph/ceph-13.2.6.ebuild create mode 100644 sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch create mode 100644 sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch (limited to 'sys-cluster/ceph') diff --git a/sys-cluster/ceph/Manifest b/sys-cluster/ceph/Manifest index df1d1773a4f8..c1b79ab2b8ff 100644 --- a/sys-cluster/ceph/Manifest +++ b/sys-cluster/ceph/Manifest @@ -19,6 +19,8 @@ AUX ceph-13.2.0-mgr-python-version.patch 675 BLAKE2B 2458bd067f9947189b65c439df5 AUX ceph-13.2.0-no-virtualenvs.patch 4466 BLAKE2B 9f5176b7d3ee3b3602341864af8eb2494cfcc2268492d7ecf9f43576963de913c9be52259dd16c2a3ad6440eeb33604ce609fc11e7e36236a37c02b84ad81890 SHA512 7b9ab0a7e22784f66253f873dd76bb3e76cfff4781632ed51d39beefacdd1a7f4d90441aff9fd93987837fadaa847906bba32eb18c86f8a8fe31205246cbfd8d AUX ceph-13.2.2-dont-install-sysvinit-script.patch 471 BLAKE2B 85ef94f49408496360fa24a433e9d6f3568749a6dfb415cbd17bfb950b9500f182c5141eab402686001f95e1611e60accdac7111ceca14f03b1ff8b4345c087f SHA512 ea069b75b786c22166c609b127b512802cc5c6e9512d792d7b7b34d276f5b86d57c8c35cfc7b5c855a59c0ba87ba1aabe2ca26da72b26bff46b6ba8410ddb27e AUX ceph-13.2.5-no-automagic-deps.patch 1056 BLAKE2B dbae76e4be1ca690ff59c0b905ef63b9fbcddcb25d181af2a514113f4bfd5028a8b5bce98c965d195ae69f8532731b2e9d9002f01bb91ccfcde5a29eb43b8f41 SHA512 60616eaaadbf4431769bc2e192718ee28842efc818ee561af1c2c7a5269e393efeb455260c36582d3265730d482a92fb911b4c501e486a3a6387ab4a10d1589d +AUX ceph-13.2.6-dpdk-alignment.patch 612 BLAKE2B 7f75b53383979d5790862c91ff67b41c16d94e6572c9c387ae511401d22562493bddb296f47bef60ebf586683df36b5b62744ac30d43b1c4eede053d6ae4438a SHA512 058bf0a564a158356e5a87099ea8d1372123eeee8bfdb3c25870911dccc351f33e00793456c5c04f670946559cd49bc6a8cab5553dc99bebb570910b4a787d58 +AUX ceph-13.2.6-no-virtualenvs.patch 4137 BLAKE2B 9cef3ed31ec0ab2d13091b0b76071532ffd021a5627fa91808bb7eff382a4b29945eaa6bc529e8ee3176056caf9f62af0fb4b4210d2549bbc05f018fd4ecd75c SHA512 051c80c70a951135e2a00f6688ff03f604f89c65be47c4e00e2f72ee1a071be067cc8a7a60fd4ef78587a6b79b2b26d52d5dc3efbdcf0e11d4e3e1156483b03e AUX ceph-14.2.0-boost-1.70-sonames.patch 13703 BLAKE2B a619a07217895ae34a84c145930d9b477cc557d5088d1fb915f0427556330a24cb4385e953facf7cb2dcf99c1245bd25d2ebe25db56dec40648ad065bce7e873 SHA512 69f82d5f10b1237c17428b11e746422fcd0e1be735500032892d834361e636a23135cb7e6f537cbd808b74378325c24132a88f256abcce40ec1bdfe212b7648c AUX ceph-14.2.0-boost-1.70.patch 5556 BLAKE2B 7610a48c30fe5cf8462f498501a36c17c33289967e7d50456d6b8e6c467db89b768f73bb6e69ecd4c6dec0432d4fbb47af339f02eb510ba69770b9b122b41dbf SHA512 71ee1d583f71b2c52fee40e5105d1ff1d4b676230eac7c19f42754316c3958808304155a48992f8766eded52d3e28007b631680dca8b4672153fa44b8eccbbb8 AUX ceph-14.2.0-boost-sonames.patch 14155 BLAKE2B 766a3e40c8a4d94d1cc52a511f0d440178c199cb37b1d06a792fe627df4f01793d8555005054604397d02d9e366521b10788f6e56381a6d967814370e4298844 SHA512 91184e32d3ef28a43bc8e0d53b4f359c5b2177250b39bbcc7921e38d044ba54610713826bc64450a0b2232450f68e724d23757cc5c6d39e50855060e86890ed2 @@ -48,10 +50,12 @@ DIST ceph-12.2.11.tar.gz 79009034 BLAKE2B d8b1c188fe39603e90511eb436100ba14c0a9c DIST ceph-12.2.12.tar.gz 77467762 BLAKE2B a5224432121db9ef49c1e22771d847399df2f7881cd9c2e185eca12096efb79d21578659d248eb5bae678924983d57452d370e23ab7e78663764d7bea834a461 SHA512 e694c9a8c1f9836c08fb74b54423bdc16d4900252e34643c56cf1a615d4dacddfb13df06a6a9f68bb9d438f5f07069ed358f9fa4b5a362640a3046f9c7722dcc DIST ceph-12.2.8.tar.gz 77243685 BLAKE2B 37c34396a0c276b8d79735e14934ac70da024822c2a060061531c234e03e5d41aad6c41dc64b05c2ce47f03287d0cae9ef9bed67e4a0861b6380c8ce1de4ea69 SHA512 91c5c11aaeef701b3e31c9f8a1192b6b79fd34f3b96c61595c65173c98bfce0009c5b7c9b29764f5e4d4b1f5ac2ca7109fed5ae598c176aba717a34a132fabac DIST ceph-13.2.5.tar.gz 91006057 BLAKE2B 68551e2f54d78aff7b0e9ec3c62e6a3394dd7c23e80924a5b400cd9666a05a42e5f22445deee4040f1b78201c6a6660b283109878d4c92d845821bff831c8a5e SHA512 6daea524523f829e725609328ea71f416b2c3a9530fa8956720a7bc69dc08e55a169654f500704579dc9ba693f04eedd7e04614c0850e9ab1169cd45f19039f8 +DIST ceph-13.2.6.tar.gz 90808224 BLAKE2B cd7b4f4838eafc9dd580102cbb5247b86a153f90127f81355b556f32dbbacd2d7fb0144d15f99869a318a7148d2f50a9f995eb05aee056d7a5843830ede5702c SHA512 1e9c08d16b14447bf6b8bb72144e053aa9d5cf390bb4a6e878869e38895d3698073502fe9c4f8b775a3da872b920444bd01260105d3a839e53cf90cd27c6ab9c DIST ceph-14.2.1.tar.gz 117111511 BLAKE2B c00181223c6e02e7fe696ed4226f1751eca48e799f8b5377a06621eb3300f81b58dc20f325b455df04fcbd0c28b981fae1cfc778a8d69414247ddd206d0c6175 SHA512 fccde341344c721fbfc7f7cb73db4f65933d7fcacc9495398b55b37d1e208f0bad0cd78a4da08a3b5e26cca3175e7707f7dfb76fae5aa094f58afaed8603c866 EBUILD ceph-12.2.11.ebuild 8025 BLAKE2B 0b7a0acd31afef011b05907332ecafd8ca72fe6d90244bcdfd879eb1b554a6293349b16638ad151052048019863ede89da0aa5024a6561c9016fab15f24f1778 SHA512 b6d0203fb1aec6ba62a2d7db6ee62794efab5389f4ac9a86cb4ad796f6f81985f8d8e107d55abfdc669a6beb55ecaeaa2e71d4283f3d93ee135803bc2d17293f EBUILD ceph-12.2.12-r2.ebuild 8390 BLAKE2B dbbf53017559230bfc03f4cf267e325e5c2c112657ced392c9ce93653fe796d2793b198150f24e8217c5b8c8a1fde750cb1ffa16cde2d5c990cd77e69001bfd8 SHA512 48e7f521c584aba6373f5e63c5769671cd016f0726fb30233b57c8a1598b01570fcee9765c3a58a6bdbdd92fe5c3bd8bf4e16aca340a47986c546624fb5c20d5 EBUILD ceph-12.2.8-r1.ebuild 7886 BLAKE2B e99590739ce73d96895c282108d3b945bb0e13bdb73e34b06d2da5c9e7d74dc4fdceddfb6330a106b775c612c7cca6b67325b83389f1c6d5af712e59a6f1fd55 SHA512 ab8d2a1ee7c4a7d7179f81e18dc601a18da365663351d88cf6dfee32e2aaaf40412bc2fde98d7c07012f79f8b6c19bac773ef97b872a32b663748ce41a5954c1 EBUILD ceph-13.2.5-r4.ebuild 9007 BLAKE2B fc84d7fee8572582743979cd3da76cdd337667843410f8efb167ec80442d006b6d4c1c947ffeeb9c6265c47116a6cf15a012f4277c619cb55ad942b0e95f6cdb SHA512 eec2780a80d98b3a535a33c86efaae4112605b8c6e220b61beb9956ece895a8807024fe71f86b626c89b3ca8af3b94a4c0e990c47e9951cc31490a90c1841ff3 +EBUILD ceph-13.2.6.ebuild 9133 BLAKE2B d5990d637edaa460b90eadc0b97c8952b2e7688c4916f0978bb15e9c2b99c206f3be5c2f57ded889393e5ba32fa63bf08a89138ea96a7045b6a47a3cd59d0381 SHA512 7a510c208b8b15fe124aafba24d25c0f181bc2ff61710d274e59c383f5d0a27ef83fbbd6b19e1020953887a0a4221769d88e8f75e720d0af3fa93ba5d9c50792 EBUILD ceph-14.2.1.ebuild 10034 BLAKE2B b179d248d3b80566cdd061463beea542ec7013646c429cb179620f09db0c485f6e6cb6192df0c37c398f167d57e6fcbd7e0d51df543abd32ddf72a932a9b0283 SHA512 be69c25fac899365a3fb5074233fc8e6561e5f1c35a2cd21a712cc218c5aef7ff220eeecbcf1c2412fec67aca4bd147a5d35077930adf5f9a41011935eb6b905 MISC metadata.xml 1588 BLAKE2B c3a1f7afa0e61fc589e60ec00bc1702a6f953bbbbc1ab6a8582fe08bad9f6af9217350641399bc7de4dfb69a79ee0e41b46d971eef53348f3b568c6dcd439273 SHA512 ac2196349f897b7dfafaa924cda3f4eb094233bd04e7949b9f8fafd135775202c3c1bdc11cc4a931e752fb40b9d1c86524cdd849a23d364e4f2aa240bbdf1250 diff --git a/sys-cluster/ceph/ceph-13.2.6.ebuild b/sys-cluster/ceph/ceph-13.2.6.ebuild new file mode 100644 index 000000000000..18241357036d --- /dev/null +++ b/sys-cluster/ceph/ceph-13.2.6.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{5,6}} ) +DISTUTILS_OPTIONAL=1 + +inherit check-reqs cmake-utils distutils-r1 flag-o-matic multiprocessing \ + python-r1 udev user readme.gentoo-r1 systemd bash-completion-r1 + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ceph/ceph.git" + SRC_URI="" +else + SRC_URI="https://download.ceph.com/tarballs/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Ceph distributed filesystem" +HOMEPAGE="https://ceph.com/" + +LICENSE="LGPL-2.1 CC-BY-SA-3.0 GPL-2 BSD Boost-1.0 MIT" +SLOT="0" + +CPU_FLAGS_X86=(sse{,2,3,4_1,4_2} ssse3) + +IUSE="babeltrace cephfs dpdk fuse jemalloc ldap libressl lttng +mgr" +IUSE+=" numa +radosgw +ssl static-libs +system-boost systemd +tcmalloc" +IUSE+=" test xfs zfs" +IUSE+=" $(printf "cpu_flags_x86_%s\n" ${CPU_FLAGS_X86[@]})" + +# unbundling code commented out pending bugs 584056 and 584058 +#>=dev-libs/jerasure-2.0.0-r1 +#>=dev-libs/gf-complete-2.0.0 +COMMON_DEPEND=" + virtual/libudev:= + app-arch/bzip2:=[static-libs?] + app-arch/lz4:=[static-libs?] + app-arch/snappy:=[static-libs?] + app-arch/zstd:=[static-libs?] + app-misc/jq:=[static-libs?] + dev-libs/crypto++:=[static-libs?] + dev-libs/leveldb:=[snappy,static-libs?,tcmalloc?] + dev-libs/libaio:=[static-libs?] + dev-libs/libxml2:=[static-libs?] + dev-libs/nss:= + sys-auth/oath-toolkit:= + sys-apps/keyutils:=[static-libs?] + sys-apps/util-linux:=[static-libs?] + sys-libs/zlib:=[static-libs?] + babeltrace? ( dev-util/babeltrace ) + ldap? ( net-nds/openldap:=[static-libs?] ) + lttng? ( dev-util/lttng-ust:= ) + fuse? ( sys-fs/fuse:0=[static-libs?] ) + numa? ( sys-process/numactl:=[static-libs?] ) + ssl? ( + !libressl? ( dev-libs/openssl:=[static-libs?] ) + libressl? ( dev-libs/libressl:=[static-libs?] ) + ) + xfs? ( sys-fs/xfsprogs:=[static-libs?] ) + zfs? ( sys-fs/zfs:=[static-libs?] ) + radosgw? ( + dev-libs/expat:=[static-libs?] + !libressl? ( + dev-libs/openssl:=[static-libs?] + net-misc/curl:=[curl_ssl_openssl,static-libs?] + ) + libressl? ( + dev-libs/libressl:=[static-libs?] + net-misc/curl:=[curl_ssl_libressl,static-libs?] + ) + ) + system-boost? ( + >=dev-libs/boost-1.67:=[threads,context,python,static-libs?,${PYTHON_USEDEP}] + ) + jemalloc? ( dev-libs/jemalloc:=[static-libs?] ) + !jemalloc? ( >=dev-util/google-perftools-2.4:=[static-libs?] ) + ${PYTHON_DEPS} + " +DEPEND="${COMMON_DEPEND} + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) + app-arch/cpio + dev-python/cython[${PYTHON_USEDEP}] + dev-python/sphinx + dev-util/cunit + dev-util/gperf + dev-util/valgrind + sys-apps/which + sys-devel/bc + virtual/pkgconfig + test? ( + dev-python/coverage[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + sys-apps/grep[pcre] + sys-fs/btrfs-progs + )" +RDEPEND="${COMMON_DEPEND} + net-misc/socat + sys-apps/gptfdisk + sys-block/parted + sys-fs/cryptsetup + sys-fs/lvm2[-device-mapper-only(-)] + !/dev/null || die + emake VERBOSE=1 clean + emake VERBOSE=1 all + + # python modules are only compiled with "make install" so we need to do this to + # prevent doing a bunch of compilation in src_install + DESTDIR="${T}" emake VERBOSE=1 install + popd >/dev/null || die +} + +src_compile() { + cmake-utils_src_make VERBOSE=1 all + + # we have to do this here to prevent from building everything multiple times + BUILD_DIR="${CMAKE_BUILD_DIR}" python_copy_sources + python_foreach_impl python_compile +} + +src_test() { + make check || die "make check failed" +} + +python_install() { + local CMAKE_USE_DIR="${S}" + pushd "${BUILD_DIR}/src/pybind" >/dev/null || die + DESTDIR="${ED}" emake install + popd >/dev/null || die +} + +src_install() { + cmake-utils_src_install + python_foreach_impl python_install + + find "${D}" -name '*.la' -delete || die + + exeinto /usr/$(get_libdir)/ceph + newexe "${BUILD_DIR}/bin/init-ceph" ceph_init.sh + + insinto /etc/logrotate.d/ + newins "${FILESDIR}"/ceph.logrotate-r2 ${PN} + + keepdir /var/lib/${PN}{,/tmp} /var/log/${PN}/stat + + fowners -R ceph:ceph /var/lib/ceph /var/log/ceph + + newinitd "${FILESDIR}/rbdmap.initd" rbdmap + newinitd "${FILESDIR}/${PN}.initd-r12" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r5" ${PN} + + insinto /etc/sysctl.d + newins "${FILESDIR}"/sysctld 90-${PN}.conf + + use tcmalloc && newenvd "${FILESDIR}"/envd-tcmalloc 99${PN}-tcmalloc + + # units aren't installed by the build system unless systemd is enabled + # so no point installing these with the USE flag disabled + if use systemd; then + systemd_install_serviced "${FILESDIR}/ceph-mds_at.service.conf" \ + "ceph-mds@.service" + + systemd_install_serviced "${FILESDIR}/ceph-osd_at.service.conf" \ + "ceph-osd@.service" + fi + + udev_dorules udev/*.rules + + readme.gentoo_create_doc + + python_setup 'python3*' + + # bug #630232 + sed -i -r "s:${T//:/\\:}/${EPYTHON}:/usr:" "${ED}"/usr/bin/ceph \ + || die "sed failed" + + python_fix_shebang "${ED}"/usr/{,s}bin/ + + # python_fix_shebang apparently is not idempotent + sed -i -r 's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \ + "${ED}"/usr/{sbin/ceph-disk,bin/ceph-detect-init} || die "sed failed" + + local -a rados_classes=( "${D}/usr/$(get_libdir)/rados-classes"/* ) + dostrip -x "${rados_classes[@]#${D}}" +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch b/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch new file mode 100644 index 000000000000..c5d048eb7a2e --- /dev/null +++ b/sys-cluster/ceph/files/ceph-13.2.6-dpdk-alignment.patch @@ -0,0 +1,14 @@ +diff --git a/src/spdk/dpdk/lib/librte_net/rte_ether.h b/src/spdk/dpdk/lib/librte_net/rte_ether.h +index 3a87ff184..8090b7c01 100644 +--- a/src/spdk/dpdk/lib/librte_net/rte_ether.h ++++ b/src/spdk/dpdk/lib/librte_net/rte_ether.h +@@ -55,7 +55,8 @@ extern "C" { + * See http://standards.ieee.org/regauth/groupmac/tutorial.html + */ + struct ether_addr { +- uint8_t addr_bytes[ETHER_ADDR_LEN]; /**< Addr bytes in tx order */ ++ /** Addr bytes in tx order */ ++ uint8_t addr_bytes[ETHER_ADDR_LEN] __rte_aligned(2); + } __attribute__((__packed__)); + + #define ETHER_LOCAL_ADMIN_ADDR 0x02 /**< Locally assigned Eth. address. */ diff --git a/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch b/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch new file mode 100644 index 000000000000..ad38799b6901 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-13.2.6-no-virtualenvs.patch @@ -0,0 +1,74 @@ +diff --git a/src/ceph-detect-init/CMakeLists.txt b/src/ceph-detect-init/CMakeLists.txt +index 6e5946b784..233cccfc9b 100644 +--- a/src/ceph-detect-init/CMakeLists.txt ++++ b/src/ceph-detect-init/CMakeLists.txt +@@ -2,8 +2,8 @@ set(CEPH_DETECT_INIT_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-detect-init-virtua + + add_custom_target(ceph-detect-init + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} && +- ${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e . ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DETECT_INIT_VIRTUALENV} && ++ #${CEPH_DETECT_INIT_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-detect-init/wheelhouse -e . + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-detect-init + COMMENT "ceph-detect-init is being created") + add_dependencies(tests ceph-detect-init) +diff --git a/src/ceph-disk/CMakeLists.txt b/src/ceph-disk/CMakeLists.txt +index 00aaec4a80..b0700c488f 100644 +--- a/src/ceph-disk/CMakeLists.txt ++++ b/src/ceph-disk/CMakeLists.txt +@@ -2,8 +2,8 @@ set(CEPH_DISK_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/ceph-disk-virtualenv) + + add_custom_target(ceph-disk + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} && +- ${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e . ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=python2.7 ${CEPH_DISK_VIRTUALENV} && ++ #${CEPH_DISK_VIRTUALENV}/bin/pip install --no-index --find-links=file:${CMAKE_SOURCE_DIR}/src/ceph-disk/wheelhouse -e . + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-disk + COMMENT "ceph-disk is being created") + add_dependencies(tests ceph-disk) +diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt +index 88ca8a60bb..77c716cdb1 100644 +--- a/src/pybind/mgr/dashboard/CMakeLists.txt ++++ b/src/pybind/mgr/dashboard/CMakeLists.txt +@@ -2,7 +2,7 @@ set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv) + + add_custom_target(mgr-dashboard-test-venv + COMMAND +- ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV} ++ #${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${MGR_DASHBOARD_VIRTUALENV} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard + COMMENT "dashboard tests virtualenv is being created") + add_dependencies(tests mgr-dashboard-test-venv) +@@ -13,9 +13,6 @@ set(mgr-dashboard-nodeenv ${CMAKE_CURRENT_BINARY_DIR}/node-env) + + add_custom_command( + OUTPUT "${mgr-dashboard-nodeenv}/bin/npm" +- COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv} +- COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv +- COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 10.13.0 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "dashboard nodeenv is being installed" + ) +@@ -27,7 +24,6 @@ add_custom_target(mgr-dashboard-nodeenv + + add_custom_command( + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules" +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && npm ci && deactivate + DEPENDS frontend/package.json + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend + COMMENT "dashboard frontend dependencies are being installed" +@@ -62,9 +58,11 @@ else() + set(npm_command npm run build) + endif() + ++LIST(APPEND CMAKE_PROGRAM_PATH ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules/.bin) ++ + add_custom_command( + OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/dist" +- COMMAND . ${mgr-dashboard-nodeenv}/bin/activate && ${npm_command} && deactivate ++ COMMAND PREFIX="${CMAKE_SOURCE_DIR}" ${npm_command} + DEPENDS ${frontend_src} frontend/node_modules + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend + COMMENT "dashboard frontend is being created" -- cgit v1.2.3