From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7E019158094 for ; Fri, 9 Sep 2022 20:02:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B032E091F; Fri, 9 Sep 2022 20:02:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 009DDE091F for ; Fri, 9 Sep 2022 20:02:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 335A7341109 for ; Fri, 9 Sep 2022 20:02:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D2B9C5E7 for ; Fri, 9 Sep 2022 20:02:48 +0000 (UTC) From: "Ronny Gutbrod" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ronny Gutbrod" Message-ID: <1662691924.86d79e93a1b6f7fffa3b8543d87a99a10ee96a14.tastytea@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: www-apps/code-server-bin/ X-VCS-Repository: repo/proj/guru X-VCS-Files: www-apps/code-server-bin/Manifest www-apps/code-server-bin/code-server-bin-4.6.1.ebuild X-VCS-Directories: www-apps/code-server-bin/ X-VCS-Committer: tastytea X-VCS-Committer-Name: Ronny Gutbrod X-VCS-Revision: 86d79e93a1b6f7fffa3b8543d87a99a10ee96a14 X-VCS-Branch: master Date: Fri, 9 Sep 2022 20:02:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fe7f9614-fdfa-42ad-bf6c-0f0dafb73cff X-Archives-Hash: 758a5611389fe53d01dfbe297f2e0322 commit: 86d79e93a1b6f7fffa3b8543d87a99a10ee96a14 Author: Leonardo Hernández Hernández outlook com> AuthorDate: Fri Sep 9 02:47:58 2022 +0000 Commit: Ronny Gutbrod tastytea de> CommitDate: Fri Sep 9 02:52:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=86d79e93 www-apps/code-server-bin: add 4.6.1 Signed-off-by: Leonardo Hernández Hernández outlook.com> www-apps/code-server-bin/Manifest | 2 + .../code-server-bin/code-server-bin-4.6.1.ebuild | 126 +++++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/www-apps/code-server-bin/Manifest b/www-apps/code-server-bin/Manifest index cf97e193e..adf420fc6 100644 --- a/www-apps/code-server-bin/Manifest +++ b/www-apps/code-server-bin/Manifest @@ -1,2 +1,4 @@ DIST code-server-4.5.1-linux-amd64.tar.gz 99839294 BLAKE2B a72b14b8647b8814d4c79e84f2cf0ef09f8db5462bb1a4611cb65c089e9dea24d72bda3a20ac3a606d7c5ff2f62e23b0d53daec0444421ad3d302343e947468b SHA512 d53f2187830617ce83a0b23ad7258571436fe0d2e259a2d2f0f5869c6588c68974ddcc1871a5eb09c5106e32460732a3449a1d4b0a5d14b921061eea080e89fc DIST code-server-4.5.1-linux-arm64.tar.gz 90931432 BLAKE2B 829c405c4b47339dad4bcc883433716e2f2da2b64e90b461fa8fb12f61414768a0705624c01f1eb13fc984a09fe1d8ce15c36aefd33afcd8406af7688d58a552 SHA512 91f1554c0505eefc717ea6f479fa6d7560c1abd121934842e333775d0a01a205dea203914d223a8c4ea69edd65203a557243e4a4fe040e0833531e77a31e5398 +DIST code-server-4.6.1-linux-amd64.tar.gz 98908844 BLAKE2B 7ca74733578b8f2fcfbc395a2fd385511b23ebced014f024904e1bf29dfa48f0ac7295746f61ea3a9d8cafa13e2b9072d48062f753ffab4f95470b868958d5e7 SHA512 d4bf2cbc06cdf6fe387758a6968bb4db375745f24c32c7b1f5ad199295fb363b83a071d6de78f55f117e20e78287274a0ab7b654b03454ed3056e4ea4cbefb2d +DIST code-server-4.6.1-linux-arm64.tar.gz 89823651 BLAKE2B 1795c6d7f3198f26a5f8567fe00c59e01f6bc9dd1230e74672671399d3ee9d2566ae73711ae30fdece51a387c4d5cfe3738ade6705b91610da67fabc7adcc6fc SHA512 36c3d102c5fdf09c1ce8e22edc10464c6f9b6915572a7ce8b9c50a77f77489a5ba89e050f204383375d04772f7ebce6dde5d6914c3d769af8f7e4d2e53831b0c diff --git a/www-apps/code-server-bin/code-server-bin-4.6.1.ebuild b/www-apps/code-server-bin/code-server-bin-4.6.1.ebuild new file mode 100644 index 000000000..9c32a8ba2 --- /dev/null +++ b/www-apps/code-server-bin/code-server-bin-4.6.1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="${PN/-bin/}" +MY_P="${MY_PN}-${PV}" +BASE_URI="https://github.com/coder/${MY_PN}/releases/download/v${PV}/${MY_P}-linux" + +inherit systemd + +DESCRIPTION="VS Code in the browser (binary version with unbundled node and ripgrep)" +HOMEPAGE="https://coder.com/" +SRC_URI=" + amd64? ( ${BASE_URI}-amd64.tar.gz ) + arm64? ( ${BASE_URI}-arm64.tar.gz ) +" +RESTRICT="test" +LICENSE="MIT 0BSD ISC PYTHON BSD-2 BSD Apache-2.0 Unlicense LGPL-2.1+ + || ( BSD-2 MIT Apache-2.0 ) + || ( MIT WTFPL ) +" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="gnome-keyring" + +RDEPEND=" + ${DEPEND} + >=net-libs/nodejs-16.0.0[ssl] + sys-apps/ripgrep + gnome-keyring? ( + app-crypt/libsecret + ) +" + +S="${WORKDIR}/${MY_P}-linux-${ARCH}" + +PATCHES=( "${FILESDIR}/${PN}-node.patch" ) + +DOCS=( "LICENSE" "README.md" "ThirdPartyNotices.txt" ) + +# Relative +VSCODE_MODULES="lib/vscode/node_modules" + +QA_PREBUILT=" + opt/${PN}/lib/coder-cloud-agent + opt/${PN}/node_modules/argon2/lib/binding/napi-v3/argon2.node + opt/${PN}/node_modules/argon2/build-tmp-napi-v3/Release/argon2.node + opt/${PN}/node_modules/argon2/build-tmp-napi-v3/Release/obj.target/argon2.node + opt/${PN}/node_modules/@node-rs/argon2-linux-x64-musl/argon2.linux-x64-musl.node + opt/${PN}/node_modules/@node-rs/argon2-linux-x64-gnu/argon2.linux-x64-gnu.node + opt/${PN}/${VSCODE_MODULES}/native-is-elevated/build/Release/obj.target/iselevated.node + opt/${PN}/${VSCODE_MODULES}/native-is-elevated/build/Release/iselevated.node + opt/${PN}/${VSCODE_MODULES}/node-pty/build/Release/pty.node + opt/${PN}/${VSCODE_MODULES}/native-watchdog/build/Release/obj.target/watchdog.node + opt/${PN}/${VSCODE_MODULES}/native-watchdog/build/Release/watchdog.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.musl.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node + opt/${PN}/${VSCODE_MODULES}/spdlog/build/Release/obj.target/spdlog.node + opt/${PN}/${VSCODE_MODULES}/spdlog/build/Release/spdlog.node + opt/${PN}/${VSCODE_MODULES}/vscode-nsfw/build/Release/obj.target/nsfw.node + opt/${PN}/${VSCODE_MODULES}/vscode-nsfw/build/Release/nsfw.node + opt/${PN}/${VSCODE_MODULES}/@vscode/sqlite3/build/Release/obj.target/sqlite.node + opt/${PN}/${VSCODE_MODULES}/@vscode/sqlite3/build/Release/sqlite.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/build/Release/watcher.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/build/Release/obj.target/watcher.node +" + +QA_PRESTRIPPED=" + opt/${PN}/node_modules/@node-rs/argon2-linux-x64-musl/argon2.linux-x64-musl.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.musl.node + opt/${PN}/${VSCODE_MODULES}/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node +" + +src_prepare() { + default + + # We remove as much precompiled code as we can, + # node modules not written in JS cannot be removed + # thus "-bin". + + # use system node + rm ./node ./lib/node \ + || die "Failed to remove bundled nodejs" + + # remove bundled ripgrep binary + rm ./"${VSCODE_MODULES}"/@vscode/ripgrep/bin/rg \ + || die "Failed to remove bundled ripgrep" + + # not needed + rm ./code-server || die + rm ./postinstall.sh || die + + # For windows + rm -r ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/win32-x64 || die + + if [[ $ELIBC != "musl" ]]; then + rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/linux-x64/node.napi.musl.node || die + elif [[ $ELIBC != "glibc" ]]; then + rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node || die + rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/darwin-x64/node.napi.glibc.node || die + rm ./"${VSCODE_MODULES}"/@parcel/watcher/prebuilds/darwin-arm64/node.napi.glibc.node || die + fi + + rm -r ./lib/vscode/extensions/node_modules/.bin || die +} + +src_install() { + einstalldocs + + insinto "/opt/${PN}" + doins -r . + fperms +x "/opt/${PN}/bin/${MY_PN}" + dosym -r "/opt/${PN}/bin/${MY_PN}" "/opt/${PN}/bin/${PN}" + dosym -r "/opt/${PN}/bin/${PN}" "${EPREFIX}/usr/bin/${PN}" + + dosym -r "/usr/bin/rg" \ + "${EPREFIX}/opt/${PN}/${VSCODE_MODULES}/@vscode/ripgrep/bin/rg" + + systemd_douserunit "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + elog "When using code-server systemd service run it as a user" + elog "For example: 'systemctl --user enable --now code-server'" +}