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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 64C20138359 for ; Sun, 26 Jul 2020 21:27:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 99683E0829; Sun, 26 Jul 2020 21:27:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 627A1E0829 for ; Sun, 26 Jul 2020 21:27:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 954B634EDB7 for ; Sun, 26 Jul 2020 21:27:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 120DC295 for ; Sun, 26 Jul 2020 21:27:40 +0000 (UTC) From: "Maciej Barć" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Maciej Barć" Message-ID: <1595798806.3e02c80346e90720279af8702b3b8535ab3afb5a.xgqt@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: www-apps/code-server-bin/files/, 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-3.4.1.ebuild www-apps/code-server-bin/files/code-server-bin-3.4.1-node.patch www-apps/code-server-bin/files/code-server.service www-apps/code-server-bin/metadata.xml X-VCS-Directories: www-apps/code-server-bin/files/ www-apps/code-server-bin/ X-VCS-Committer: xgqt X-VCS-Committer-Name: Maciej Barć X-VCS-Revision: 3e02c80346e90720279af8702b3b8535ab3afb5a X-VCS-Branch: dev Date: Sun, 26 Jul 2020 21:27:40 +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: a966bd30-1f59-4ae2-8071-ea0a4f88db4b X-Archives-Hash: 34d2b5d0f8c2f21102fd0f72e4fb8156 commit: 3e02c80346e90720279af8702b3b8535ab3afb5a Author: Maciej Barć protonmail com> AuthorDate: Sun Jul 26 21:26:46 2020 +0000 Commit: Maciej Barć protonmail com> CommitDate: Sun Jul 26 21:26:46 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3e02c803 www-apps/code-server-bin: new package; add version 3.4.1 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Maciej Barć protonmail.com> www-apps/code-server-bin/Manifest | 2 + .../code-server-bin/code-server-bin-3.4.1.ebuild | 80 ++++++++++++++++++++++ .../files/code-server-bin-3.4.1-node.patch | 8 +++ www-apps/code-server-bin/files/code-server.service | 11 +++ www-apps/code-server-bin/metadata.xml | 19 +++++ 5 files changed, 120 insertions(+) diff --git a/www-apps/code-server-bin/Manifest b/www-apps/code-server-bin/Manifest new file mode 100644 index 0000000..99f5c6c --- /dev/null +++ b/www-apps/code-server-bin/Manifest @@ -0,0 +1,2 @@ +DIST code-server-3.4.1-linux-amd64.tar.gz 74127655 BLAKE2B 95e916e64c886688b370407ba932624a70b024cae64a57e7eb77f31c6a352138313fbced149adf2ee698d925b9e2a818823b25931a42a01d5e2eaedb082bbf1d SHA512 efd55c84fda96f22bec79b54f60d02a8d098f41cef77549c805c125eb845efae43d3f4703908f0542a78146eda67ebd9787f89b1c14b1b8044fdfd534f2b9173 +DIST code-server-3.4.1-linux-arm64.tar.gz 73470946 BLAKE2B 278a1fef95b612242f4126eea53d7b8dc824fc5dda55ff6b2f1e7752d3ebecebcf30045c1c2bb2a18d1ad7999b20c29398a3c5715920d6e8d8c94eaa76e8a619 SHA512 24168006e737a6579869b8e4b157e21d9ef85282b811783163f0d2291e47bee7e0794c8327663182922b473ff57999432e6c53502849836a53d300728341d1bc diff --git a/www-apps/code-server-bin/code-server-bin-3.4.1.ebuild b/www-apps/code-server-bin/code-server-bin-3.4.1.ebuild new file mode 100644 index 0000000..0eb856d --- /dev/null +++ b/www-apps/code-server-bin/code-server-bin-3.4.1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="${PN/-bin/}" +MY_PV="${MY_PN}-${PV}" + +BASE_URI="https://github.com/cdr/${MY_PN}/releases/download/${PV}/${MY_PV}-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 ) +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm64" +IUSE="" + +# In case we ever make a non-"-binary" pkg +DEPEND=" + !www-apps/code-server +" +RDEPEND=" + ${DEPEND} + >=net-libs/nodejs-12.16.1[ssl] + sys-apps/ripgrep +" + +S="${WORKDIR}/${MY_PV}-linux-${ARCH}" + +PATCHES=( + "${FILESDIR}/${PN}-${PV}-node.patch" +) + +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 || die + rm lib/node || die + + # remove bundled ripgrep binary + rm lib/vscode/node_modules/vscode-ripgrep/bin/rg || die + + # not needed + rm code-server + rm postinstall.sh +} + +src_install() { + local mydocs="LICENSE.txt README.md ThirdPartyNotices.txt" + for doc in ${mydocs} + do + (dodoc "${doc}" && rm "${doc}") || die + done + + insinto "/usr/lib/${MY_PN}" + doins -r . + fperms +x "${EPREFIX}/usr/lib/${MY_PN}/bin/${MY_PN}" + dosym "${EPREFIX}/usr/lib/${MY_PN}/bin/${MY_PN}" "${EPREFIX}/usr/bin/${MY_PN}" + + dosym "${EPREFIX}/usr/bin/rg" "${EPREFIX}/usr/lib/${MY_PN}/lib/vscode/node_modules/vscode-ripgrep/bin/rg" + + systemd_dounit "${FILESDIR}/${MY_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'" +} diff --git a/www-apps/code-server-bin/files/code-server-bin-3.4.1-node.patch b/www-apps/code-server-bin/files/code-server-bin-3.4.1-node.patch new file mode 100644 index 0000000..8bcfe36 --- /dev/null +++ b/www-apps/code-server-bin/files/code-server-bin-3.4.1-node.patch @@ -0,0 +1,8 @@ +--- a/bin/code-server ++++ b/bin/code-server +@@ -33,4 +33,4 @@ root() { + } + + ROOT="$(root)" +-exec "$ROOT/lib/node" "$ROOT" "$@" ++exec node "$ROOT" --disable-telemetry "$@" diff --git a/www-apps/code-server-bin/files/code-server.service b/www-apps/code-server-bin/files/code-server.service new file mode 100644 index 0000000..a2f48e9 --- /dev/null +++ b/www-apps/code-server-bin/files/code-server.service @@ -0,0 +1,11 @@ +[Unit] +Description=code-server +After=network.target + +[Service] +Type=exec +ExecStart=/usr/bin/code-server +Restart=always + +[Install] +WantedBy=default.target diff --git a/www-apps/code-server-bin/metadata.xml b/www-apps/code-server-bin/metadata.xml new file mode 100644 index 0000000..e3d6450 --- /dev/null +++ b/www-apps/code-server-bin/metadata.xml @@ -0,0 +1,19 @@ + + + + + xgqt@protonmail.com + Maciej Barć + + + cdr/code-server + + + Run VS Code on any machine anywhere and access it in the browser. + Code on your Chromebook, tablet, and laptop with a consistent development environment. + Develop on a Linux machine and pick up from any device with a web browser. + Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. + Preserve battery life when you're on the go as all intensive tasks runs on your server. + Make use of a spare computer you have lying around and turn it into a full development environment. + +