public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/files/
Date: Wed, 24 Aug 2022 01:53:33 +0000 (UTC)	[thread overview]
Message-ID: <1661306009.35ff86bd118846126973f9410a94d35c0e1aae2a.chutzpah@gentoo> (raw)

commit:     35ff86bd118846126973f9410a94d35c0e1aae2a
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 24 01:53:07 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Aug 24 01:53:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35ff86bd

sys-cluster/ceph: Remove unused script

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 .../ceph/files/make-node-frontend-tarball.bash     | 140 ---------------------
 1 file changed, 140 deletions(-)

diff --git a/sys-cluster/ceph/files/make-node-frontend-tarball.bash b/sys-cluster/ceph/files/make-node-frontend-tarball.bash
deleted file mode 100644
index 0a8015ffa985..000000000000
--- a/sys-cluster/ceph/files/make-node-frontend-tarball.bash
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/bin/bash
-
-frontend_path="src/pybind/mgr/dashboard/frontend"
-node_dir="node_modules"
-output_name_format="ceph-%s-frontend-node-modules.tar.xz"
-cache_dir_format="ceph-%s-npm-cache"
-
-# regexes for modules to remove
-remove_modules=(
-	"^karma.*"
-	"^jasmine.*"
-	".+/jasmine.*"
-	"^tslint.*"
-	"^codelyzer"
-	"^protractor"
-	"^ts-node"
-)
-
-# location to find dependencies to prune
-node_dep_location="devDependencies"
-
-# node package files
-node_package_file="package.json"
-node_package_lock="package-lock.json"
-
-# system commands needed
-dependencies=(
-	wget
-	git
-	gzip
-	jq
-	tar
-	xz
-)
-
-check_deps() {
-	local dep
-
-	for dep in "${dependencies[@]}"; do
-		if ! command -v "${dep}" >/dev/null; then
-			printf '%s: ERROR could not find required command "%s"\n' "${appname}" "${dep}" >&2
-			exit 1
-		fi
-	done
-
-	# make sure that jq was compiled with support for regexes
-	if ! jq -c 'map( select(. | test("TEST"; "i")))' <<< '{"TEST": "TEST"}' >/dev/null; then
-		printf '%s: ERROR: jq does not support regular expressions, make sure the "oniguruma" USE flag is enabled\n' \
-			"${appname}"
-		exit 1
-	fi
-	:
-}
-
-get_npm_packages() {
-	local tempfile jq_regex full_cache_dir
-
-	full_cache_dir="${PWD}/${cache_dir}"
-
-	pushd "${source_path}/${frontend_path}" > /dev/null
-	if [[ ! -r "${node_package_file}" ]]; then
-		printf '%s: ERROR: could not find "%s" in "%s"\n' "${appname}" \
-			"${node_package_file}" "${frontend_path}"
-		exit 1
-	fi
-
-	tempfile="$(TMPDIR="." mktemp packages-XXXXX.json)"
-
-	jq_regex="$(printf "%s|" "${remove_modules[@]}")"
-
-	# filter out test only deps that pull in precompiled binaries
-	# shellcheck disable=SC2031
-	jq --monochrome-output --raw-output --exit-status \
-		'."'"${node_dep_location}"'"|=with_entries(select(.key|test("('"${jq_regex%|}"')")|not))' \
-		"${node_package_file}" > "${tempfile}"
-
-	# make sure output is still valid JSON
-	jq . --exit-status "${tempfile}" > /dev/null
-
-	mv "${tempfile}" "${node_package_file}"
-
-	rm -rf "${full_cache_dir:?}" "${node_dir:?}" "${node_package_lock:?}"
-
-	npm install --ignore-scripts --cache="${full_cache_dir}"
-
-	popd >/dev/null
-}
-
-main() {
-	local appname source_path version cache_dir
-
-	set -e
-	set -o pipefail
-	shopt -s nullglob
-
-	appname=$(basename "${0}")
-	source_path="${1}"
-	version="${2}"
-
-	if [[ -z ${source_path} || -z ${version} ]]; then
-		printf 'Syntax: %s <source directory> <version>\n' "${appname}" >&2
-		return 1
-
-	elif [[ ! -d ${source_path} ]]; then
-		printf '%s: ERROR: Not a directory: %s\n' "${appname}" "${source_path}"
-		return 1
-	fi
-
-	check_deps
-
-	# shellcheck disable=SC2059
-	cache_dir="$(printf -- "${cache_dir_format}\\n" "${version}")"
-
-	get_npm_packages
-	pack_tarball
-}
-
-pack_tarball() {
-	local output
-
-	# shellcheck disable=SC2059
-	output="$(printf -- "${output_name_format}\\n" "${version}")"
-
-	tar caf "${output}" \
-		--numeric-owner \
-		--anchored \
-		--owner="root:0" \
-		--group="root:0" \
-		--exclude-vcs \
-		--transform="s:^${source_path}/:ceph-${version}/:" \
-		"${cache_dir}" \
-		"${source_path}/${frontend_path}/${node_package_file}" \
-		"${source_path}/${frontend_path}/${node_package_lock}"
-
-	printf '%s: Output written to "%s"\n' "${appname}" "${output}"
-}
-
-main "${@}"
-
-# vim:ft=sh:noet:ts=4:sts=4:sw=4:


             reply	other threads:[~2022-08-24  1:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  1:53 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-05 14:59 [gentoo-commits] repo/gentoo:master commit in: sys-cluster/ceph/files/ Florian Schmaus
2024-10-15 21:46 Conrad Kostecki
2023-06-09 17:50 Patrick McLean
2023-05-02 21:01 Patrick McLean
2023-02-06  1:57 Patrick McLean
2022-09-29 18:34 Patrick McLean
2022-08-12 22:13 Patrick McLean
2022-08-10 20:21 Patrick McLean
2022-07-18 17:33 Patrick McLean
2022-05-05 22:51 Patrick McLean
2022-03-12 18:45 David Seifert
2021-10-26 17:49 Patrick McLean
2021-05-27 20:56 Patrick McLean
2021-03-26 18:32 Conrad Kostecki
2021-03-01 22:11 Conrad Kostecki
2021-02-04 19:59 Patrick McLean
2020-06-27 20:51 Aaron Bauman
2020-04-23 17:54 Patrick McLean
2019-04-20  1:29 Aaron Bauman
2019-03-25 23:59 Patrick McLean
2018-08-07 23:37 Patrick McLean
2017-11-05 15:39 Patrice Clement
2017-10-19 22:56 Patrick McLean
2017-07-31 16:30 Patrick McLean
2017-02-10 22:34 David Seifert
2017-02-10  1:23 Patrick McLean
2015-12-23  3:15 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1661306009.35ff86bd118846126973f9410a94d35c0e1aae2a.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox