public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-02-26 16:30 Viorel Munteanu
  0 siblings, 0 replies; 6+ messages in thread
From: Viorel Munteanu @ 2024-02-26 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     cd2faf0f2155d01d90c9140031bdc1d0f6cdc0d4
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Sat Feb 24 14:06:32 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 05:47:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cd2faf0f

www-apps/vaultwarden-web: Web UI for Vaultwarden

add 2024.1.2b

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/Manifest                  |  3 +
 www-apps/vaultwarden-web/metadata.xml              | 13 ++++
 .../vaultwarden-web-2024.1.2b.ebuild               | 71 ++++++++++++++++++++++
 3 files changed, 87 insertions(+)

diff --git a/www-apps/vaultwarden-web/Manifest b/www-apps/vaultwarden-web/Manifest
new file mode 100644
index 0000000000..d0df5d97e9
--- /dev/null
+++ b/www-apps/vaultwarden-web/Manifest
@@ -0,0 +1,3 @@
+DIST bitwarden-clients-a1a5c4b.tar.xz 204680568 BLAKE2B dd7ae09792831dacf9e7c110a508315e8d57c3231c6c32014e7b842ffc01a046fec03f375c48afd40379ba2853159e594a54b3f8ec229c1568ba3d1b8c054335 SHA512 5644d0b53c525164c2af14036dd7d432be9a943b55df2aef9922329326b164b31336bd53e2f9f2eb35a858f974d8fc0a3bd3aac6e42b821d5d4634ca714a51c3
+DIST vaultwarden-web-2024.1.2.tar.gz 20199824 BLAKE2B da8f8f87a88a7baaa05985f5f8ec46ad2eae14953b1bec03fa22eb490f5d86a752d270fd76681dba23543e1d51ec02dad2c24aab60a47751300c539f9859bd46 SHA512 eea08dc128495b157ebf9b5ee48bf4b48d929257bb2b9839b2e7ac9913cb60118886df622765889aa84985a3ec47339e9f11196e1a09ebd0faa985061a43dacc
+DIST vaultwarden-web-2024.1.2b-patches.tar.gz 97946 BLAKE2B 6b43ec5949c58e88d534d24dbb1b107320a50f1989dddd79243b17c0d8c5f65989a59542196890afdc036b3114c55776d2ed6609f51ebc114935bef61323705f SHA512 5463ce39642e3d53bffe774fa5bcdfde240cd1f7eadbcef8e7db4d5795deb2bc3a601505dc091a1dd0b4aa684e6a8f59a9a8c1542251b749e9c290986dd02f7f

diff --git a/www-apps/vaultwarden-web/metadata.xml b/www-apps/vaultwarden-web/metadata.xml
new file mode 100644
index 0000000000..889a71396a
--- /dev/null
+++ b/www-apps/vaultwarden-web/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>me@rahil.rocks</email>
+		<name>Rahil Bhimjiani</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">dani-garcia/bw_web_builds</remote-id>
+		<bugs-to>https://github.com/dani-garcia/bw_web_builds/issues</bugs-to>
+		<doc>https://github.com/dani-garcia/bw_web_builds/blob/master/README.md</doc>
+	</upstream>
+</pkgmetadata>

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
new file mode 100644
index 0000000000..e39f3cfb3b
--- /dev/null
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs
+
+DESCRIPTION="Bitwarden web vault patched to make it work with Vaultwarden"
+HOMEPAGE="https://github.com/dani-garcia/bw_web_builds"
+
+BW_CLIENTS_COMMIT="a1a5c4b"
+SRC_URI="
+	https://github.com/bitwarden/clients/archive/refs/tags/web-v${PV%b}.tar.gz -> ${PN}-${PV%b}.tar.gz
+	https://github.com/rahilarious/gentoo-distfiles/releases/download/bitwarden-clients-${BW_CLIENTS_COMMIT}/deps.tar.xz -> bitwarden-clients-${BW_CLIENTS_COMMIT}.tar.xz
+	https://github.com/dani-garcia/bw_web_builds/archive/refs/tags/v${PV}.tar.gz -> ${P}-patches.tar.gz
+"
+
+S="${WORKDIR}/clients-web-v${PV%b}"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="!www-apps/vaultwarden-web-bin"
+BDEPEND="
+	net-libs/nodejs[npm]
+"
+
+CHECKREQS_MEMORY=3G
+CHECKREQS_DISK_BUILD=2G
+
+pkg_pretend() {
+	einfo ""
+	einfo "#################################################"
+	einfo "Prebuilt alternative to this package is available:"
+	einfo "        ${CATEGORY}/${PN}-bin"
+	einfo "#################################################"
+	einfo ""
+	check-reqs_pkg_pretend
+}
+
+src_prepare() {
+	default
+
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/apply_patches.sh
+	local PATCH_FILE
+	if [[ -f "../bw_web_builds-${PV}/patches/v${PV%b}.patch" ]]; then
+		einfo "Exact patch file found, using that"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/v${PV%b}.patch"
+	else
+		einfo "No exact patch file not found, using latest"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/$(find ../bw_web_builds-${PV}/patches -type f -print0 | xargs -0 basename -a | sort -V | tail -n1)" || die
+	fi
+
+	cp -vfR ../bw_web_builds*/resources/src/* ./apps/web/src/ || die
+	eapply "${PATCH_FILE}"
+
+	mv -v ../node_modules ./ || die
+}
+
+src_compile() {
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
+	pushd apps/web
+	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json || die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
+	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
+	find build -name "*.map" -delete || die
+}
+
+src_install() {
+	insinto /usr/share/webapps/"${PN}"
+	doins -r apps/web/build/*
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-02-26 16:30 Viorel Munteanu
  0 siblings, 0 replies; 6+ messages in thread
From: Viorel Munteanu @ 2024-02-26 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     9f11b6737165df85e241da9c56494d610983c335
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Mon Feb 26 06:18:55 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 06:18:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9f11b673

www-apps/vaultwarden-web/vaultwarden-web: add line break

I always forget about running pkgcheck prior to pushing

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
index e39f3cfb3b..60158ed172 100644
--- a/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
@@ -60,7 +60,8 @@ src_prepare() {
 src_compile() {
 	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
 	pushd apps/web
-	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json || die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
+	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json \
+			|| die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
 	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
 	find build -name "*.map" -delete || die
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-03-27 11:50 Rui Huang
  0 siblings, 0 replies; 6+ messages in thread
From: Rui Huang @ 2024-03-27 11:50 UTC (permalink / raw
  To: gentoo-commits

commit:     493bcb82dc508d77ddeb20e0761634727ae88f17
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Tue Mar 26 19:01:59 2024 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Tue Mar 26 19:48:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=493bcb82

www-apps/vaultwarden-web: add 2024.3.0

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/Manifest                  |   3 +
 .../vaultwarden-web-2024.3.0.ebuild                | 105 +++++++++++++++++++++
 2 files changed, 108 insertions(+)

diff --git a/www-apps/vaultwarden-web/Manifest b/www-apps/vaultwarden-web/Manifest
index d0df5d97e9..cdf195ef42 100644
--- a/www-apps/vaultwarden-web/Manifest
+++ b/www-apps/vaultwarden-web/Manifest
@@ -1,3 +1,6 @@
 DIST bitwarden-clients-a1a5c4b.tar.xz 204680568 BLAKE2B dd7ae09792831dacf9e7c110a508315e8d57c3231c6c32014e7b842ffc01a046fec03f375c48afd40379ba2853159e594a54b3f8ec229c1568ba3d1b8c054335 SHA512 5644d0b53c525164c2af14036dd7d432be9a943b55df2aef9922329326b164b31336bd53e2f9f2eb35a858f974d8fc0a3bd3aac6e42b821d5d4634ca714a51c3
+DIST bitwarden-clients-dbf0f1e.tar.xz 246354040 BLAKE2B 88ff3b2ac9d1f255313086f16f89af469b595ae95476adc7cc5a119770569dd661cd83d2b946d548902d43b68717129f9d4e8db730d5155732c76fc8d40b1f9d SHA512 1ca13c13293dca613af36f111fc74a1beb489cd7686f80800af82a5767aa41dc0420775607353e3c44e6d543b700135dec2fc63fb95436f14790168574d9aaa6
 DIST vaultwarden-web-2024.1.2.tar.gz 20199824 BLAKE2B da8f8f87a88a7baaa05985f5f8ec46ad2eae14953b1bec03fa22eb490f5d86a752d270fd76681dba23543e1d51ec02dad2c24aab60a47751300c539f9859bd46 SHA512 eea08dc128495b157ebf9b5ee48bf4b48d929257bb2b9839b2e7ac9913cb60118886df622765889aa84985a3ec47339e9f11196e1a09ebd0faa985061a43dacc
 DIST vaultwarden-web-2024.1.2b-patches.tar.gz 97946 BLAKE2B 6b43ec5949c58e88d534d24dbb1b107320a50f1989dddd79243b17c0d8c5f65989a59542196890afdc036b3114c55776d2ed6609f51ebc114935bef61323705f SHA512 5463ce39642e3d53bffe774fa5bcdfde240cd1f7eadbcef8e7db4d5795deb2bc3a601505dc091a1dd0b4aa684e6a8f59a9a8c1542251b749e9c290986dd02f7f
+DIST vaultwarden-web-2024.3.0-patches.tar.gz 111779 BLAKE2B 6c40e599407a98f9acd84e28840cd46c9a9722b82ed76ea88d0cec6f99047d6afae6b8d509a147155428851c4a746af8011fb9a6c8a82e7833c28b0dcf015e3c SHA512 d6713eb4d5ebc2da26b38e6a3bd9ed9e977fcd9c18321b369f9456d7454206916e71020b7fd4d4b844d7e6598f0d2a7cafe538004f4a6d000521a999b25b85f1
+DIST vaultwarden-web-2024.3.0.tar.gz 20547395 BLAKE2B 1c0bec79f88bd44a26ba2d1d75f4a82cf13839c86bd3d1feb31f0f326fff4bbd908890ae11be2eb3ad31c591bde286d050afdb5942930b193201959174fb01c6 SHA512 f9326b8f8b334a8a9eb376cba66411d2890f265f810f3a444283ec8da229b4a4516593010e00b00d96f4d85c1f07a90ac19094ad70c9fbad8f3ba2c92d714348

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild
new file mode 100644
index 0000000000..c5e2bb8610
--- /dev/null
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+
+inherit check-reqs python-any-r1
+
+DESCRIPTION="Bitwarden web vault patched to make it work with Vaultwarden"
+HOMEPAGE="https://github.com/dani-garcia/bw_web_builds"
+
+BW_CLIENTS_COMMIT="dbf0f1e"
+SRC_URI="
+	https://github.com/bitwarden/clients/archive/refs/tags/web-v${PV%b}.tar.gz -> ${PN}-${PV%b}.tar.gz
+	https://github.com/rahilarious/gentoo-distfiles/releases/download/bitwarden-clients-${BW_CLIENTS_COMMIT}/deps.tar.xz -> bitwarden-clients-${BW_CLIENTS_COMMIT}.tar.xz
+	https://github.com/dani-garcia/bw_web_builds/archive/refs/tags/v${PV}.tar.gz -> ${P}-patches.tar.gz
+"
+
+S="${WORKDIR}/clients-web-v${PV%b}"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="!www-apps/vaultwarden-web-bin"
+BDEPEND="
+	${PYTHON_DEPS}
+	net-libs/nodejs[npm]
+"
+
+CHECKREQS_MEMORY=3G
+CHECKREQS_DISK_BUILD=2G
+
+pkg_pretend() {
+	einfo ""
+	einfo "#################################################"
+	einfo "Prebuilt alternative to this package is available:"
+	einfo "        ${CATEGORY}/${PN}-bin"
+	einfo "#################################################"
+	einfo ""
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/apply_patches.sh
+	function replace_embedded_svg_icon() {
+		if [ ! -f $1 ]; then echo "$1 does not exist"; exit -1; fi
+		if [ ! -f $2 ]; then echo "$2 does not exist"; exit -1; fi
+
+		echo "'$1' -> '$2'"
+
+		first='`$'
+		last='^`'
+		sed -i "/$first/,/$last/{ /$first/{p; r $1
+}; /$last/p; d }" $2
+	}
+
+	local PATCH_FILE
+	if [[ -f "../bw_web_builds-${PV}/patches/v${PV%b}.patch" ]]; then
+		einfo "Exact patch file found, using that"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/v${PV%b}.patch"
+	else
+		einfo "No exact patch file not found, using latest"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/$(find ../bw_web_builds-${PV}/patches -type f -print0 | xargs -0 basename -a | sort -V | tail -n1)" || die
+	fi
+
+	cp -vfR ../bw_web_builds*/resources/src/* ./apps/web/src/ || die
+	replace_embedded_svg_icon \
+		../bw_web_builds-"${PV}"/resources/vaultwarden-admin-console-logo.svg \
+		./apps/web/src/app/admin-console/icons/admin-console-logo.ts || die
+	replace_embedded_svg_icon \
+		../bw_web_builds-"${PV}"/resources/vaultwarden-password-manager-logo.svg \
+		./apps/web/src/app/layouts/password-manager-logo.ts || die
+
+	eapply "${PATCH_FILE}"
+}
+
+src_compile() {
+	# mimicking https://contributing.bitwarden.com/getting-started/clients/
+	export \
+		npm_config_cache="${WORKDIR}"/npm-cache \
+		npm_config_nodedir="${EPREFIX}"/usr \
+		NODE_GYP_FORCE_PYTHON="${PYTHON}" \
+		ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
+		|| die
+	npm --verbose --offline clean-install || die
+
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
+	pushd apps/web
+	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json \
+			|| die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
+	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
+	find build -name "*.map" -delete || die
+}
+
+src_install() {
+	insinto /usr/share/webapps/"${PN}"
+	doins -r apps/web/build/*
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-03-28  3:43 Haelwenn Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Haelwenn Monnier @ 2024-03-28  3:43 UTC (permalink / raw
  To: gentoo-commits

commit:     b1d67fc89b160f748a2e3ec706a96b83853fccde
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Wed Mar 27 12:19:22 2024 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Wed Mar 27 12:19:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b1d67fc8

www-apps/vaultwarden-web: add dies and popds

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild | 3 ++-
 www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
index 60158ed172..2bf9f2b95d 100644
--- a/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.1.2b.ebuild
@@ -59,11 +59,12 @@ src_prepare() {
 
 src_compile() {
 	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
-	pushd apps/web
+	pushd apps/web || die
 	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json \
 			|| die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
 	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
 	find build -name "*.map" -delete || die
+	popd || die
 }
 
 src_install() {

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild
index c5e2bb8610..20f1cd608e 100644
--- a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.0.ebuild
@@ -92,11 +92,12 @@ src_compile() {
 	npm --verbose --offline clean-install || die
 
 	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
-	pushd apps/web
+	pushd apps/web || die
 	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json \
 			|| die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
 	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
 	find build -name "*.map" -delete || die
+	popd || die
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-04-08 21:32 Julien Roy
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Roy @ 2024-04-08 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     638aa63f895a3f289412214da02cb6c9c86d1f4c
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Mon Apr  8 09:30:42 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Apr  8 11:53:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=638aa63f

www-apps/vaultwarden-web: update to 2024.3.1

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/Manifest                  |   3 +
 .../vaultwarden-web-2024.3.1.ebuild                | 106 +++++++++++++++++++++
 2 files changed, 109 insertions(+)

diff --git a/www-apps/vaultwarden-web/Manifest b/www-apps/vaultwarden-web/Manifest
index cdf195ef42..38a131daa6 100644
--- a/www-apps/vaultwarden-web/Manifest
+++ b/www-apps/vaultwarden-web/Manifest
@@ -1,6 +1,9 @@
+DIST bitwarden-clients-60e47af.tar.zst 248520786 BLAKE2B 1c3f98805c199d7a4391611402a5401d164773aeb22d29d6c95eb22c4d048416d890b805ca72fe74c46958ac1dc1218cd6ef51f1b8cc5d855528f89846119d04 SHA512 baca3e3db98e9e5f12455d6a9f2b4e0d79e4d0d53f414eccadf26e765b058087bb290b17d5885a7ea9bf5880d0a916283ea97bff2dd41cd8d0825b56d7e8d790
 DIST bitwarden-clients-a1a5c4b.tar.xz 204680568 BLAKE2B dd7ae09792831dacf9e7c110a508315e8d57c3231c6c32014e7b842ffc01a046fec03f375c48afd40379ba2853159e594a54b3f8ec229c1568ba3d1b8c054335 SHA512 5644d0b53c525164c2af14036dd7d432be9a943b55df2aef9922329326b164b31336bd53e2f9f2eb35a858f974d8fc0a3bd3aac6e42b821d5d4634ca714a51c3
 DIST bitwarden-clients-dbf0f1e.tar.xz 246354040 BLAKE2B 88ff3b2ac9d1f255313086f16f89af469b595ae95476adc7cc5a119770569dd661cd83d2b946d548902d43b68717129f9d4e8db730d5155732c76fc8d40b1f9d SHA512 1ca13c13293dca613af36f111fc74a1beb489cd7686f80800af82a5767aa41dc0420775607353e3c44e6d543b700135dec2fc63fb95436f14790168574d9aaa6
 DIST vaultwarden-web-2024.1.2.tar.gz 20199824 BLAKE2B da8f8f87a88a7baaa05985f5f8ec46ad2eae14953b1bec03fa22eb490f5d86a752d270fd76681dba23543e1d51ec02dad2c24aab60a47751300c539f9859bd46 SHA512 eea08dc128495b157ebf9b5ee48bf4b48d929257bb2b9839b2e7ac9913cb60118886df622765889aa84985a3ec47339e9f11196e1a09ebd0faa985061a43dacc
 DIST vaultwarden-web-2024.1.2b-patches.tar.gz 97946 BLAKE2B 6b43ec5949c58e88d534d24dbb1b107320a50f1989dddd79243b17c0d8c5f65989a59542196890afdc036b3114c55776d2ed6609f51ebc114935bef61323705f SHA512 5463ce39642e3d53bffe774fa5bcdfde240cd1f7eadbcef8e7db4d5795deb2bc3a601505dc091a1dd0b4aa684e6a8f59a9a8c1542251b749e9c290986dd02f7f
 DIST vaultwarden-web-2024.3.0-patches.tar.gz 111779 BLAKE2B 6c40e599407a98f9acd84e28840cd46c9a9722b82ed76ea88d0cec6f99047d6afae6b8d509a147155428851c4a746af8011fb9a6c8a82e7833c28b0dcf015e3c SHA512 d6713eb4d5ebc2da26b38e6a3bd9ed9e977fcd9c18321b369f9456d7454206916e71020b7fd4d4b844d7e6598f0d2a7cafe538004f4a6d000521a999b25b85f1
 DIST vaultwarden-web-2024.3.0.tar.gz 20547395 BLAKE2B 1c0bec79f88bd44a26ba2d1d75f4a82cf13839c86bd3d1feb31f0f326fff4bbd908890ae11be2eb3ad31c591bde286d050afdb5942930b193201959174fb01c6 SHA512 f9326b8f8b334a8a9eb376cba66411d2890f265f810f3a444283ec8da229b4a4516593010e00b00d96f4d85c1f07a90ac19094ad70c9fbad8f3ba2c92d714348
+DIST vaultwarden-web-2024.3.1-patches.tar.gz 119554 BLAKE2B afd4620dbae0d050c38537c7cce13c7596e66e1615425a31bee0c9f4652470d1e4964cbea0a33fb8172371dbc4f21a01c489888f8fc28a412cc3fee0a223aa58 SHA512 f3cd1b3fe95b602777d27cded7415459a6d1ec739e50ddf9ea211ccdbb52e66e2e004182509526748ef2562cd6007c63f0a1ee5cdcc671df1a6b1f02bcab2e2b
+DIST vaultwarden-web-2024.3.1.tar.gz 20649053 BLAKE2B 374a52ded74eafea33460175fd74b174230f9111a9a89e2aecdb52cd15a626bf62eb29b6312d369a0c87ed5ddccf9324fadec10192fd2727f510df92c0682d9e SHA512 30133b2ecaaffb2ed68af7e12fcd023902ee81fecd39de4a005a565d716cfac5a67f2ea41e31c49bd242278e8a0502e6147de302ef8b5228e913027d64b01ac9

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild
new file mode 100644
index 0000000000..ecff10e558
--- /dev/null
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+
+inherit check-reqs python-any-r1 unpacker
+
+DESCRIPTION="Bitwarden web vault patched to make it work with Vaultwarden"
+HOMEPAGE="https://github.com/dani-garcia/bw_web_builds"
+
+BW_CLIENTS_COMMIT="60e47af"
+SRC_URI="
+	https://github.com/bitwarden/clients/archive/refs/tags/web-v${PV%b}.tar.gz -> ${PN}-${PV%b}.tar.gz
+	https://github.com/rahilarious/gentoo-distfiles/releases/download/bitwarden-clients-${BW_CLIENTS_COMMIT}/deps.tar.zst -> bitwarden-clients-${BW_CLIENTS_COMMIT}.tar.zst
+	https://github.com/dani-garcia/bw_web_builds/archive/refs/tags/v${PV}.tar.gz -> ${P}-patches.tar.gz
+"
+
+S="${WORKDIR}/clients-web-v${PV%b}"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="!www-apps/vaultwarden-web-bin"
+BDEPEND="
+	${PYTHON_DEPS}
+	net-libs/nodejs[npm]
+"
+
+CHECKREQS_MEMORY=3G
+CHECKREQS_DISK_BUILD=2G
+
+pkg_pretend() {
+	einfo ""
+	einfo "#################################################"
+	einfo "Prebuilt alternative to this package is available:"
+	einfo "        ${CATEGORY}/${PN}-bin"
+	einfo "#################################################"
+	einfo ""
+	check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/apply_patches.sh
+	function replace_embedded_svg_icon() {
+		if [ ! -f $1 ]; then echo "$1 does not exist"; exit -1; fi
+		if [ ! -f $2 ]; then echo "$2 does not exist"; exit -1; fi
+
+		echo "'$1' -> '$2'"
+
+		first='`$'
+		last='^`'
+		sed -i "/$first/,/$last/{ /$first/{p; r $1
+}; /$last/p; d }" $2
+	}
+
+	local PATCH_FILE
+	if [[ -f "../bw_web_builds-${PV}/patches/v${PV%b}.patch" ]]; then
+		einfo "Exact patch file found, using that"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/v${PV%b}.patch"
+	else
+		einfo "No exact patch file not found, using latest"
+		PATCH_FILE="../bw_web_builds-${PV}/patches/$(find ../bw_web_builds-${PV}/patches -type f -print0 | xargs -0 basename -a | sort -V | tail -n1)" || die
+	fi
+
+	cp -vfR ../bw_web_builds*/resources/src/* ./apps/web/src/ || die
+	replace_embedded_svg_icon \
+		../bw_web_builds-"${PV}"/resources/vaultwarden-admin-console-logo.svg \
+		./apps/web/src/app/admin-console/icons/admin-console-logo.ts || die
+	replace_embedded_svg_icon \
+		../bw_web_builds-"${PV}"/resources/vaultwarden-password-manager-logo.svg \
+		./apps/web/src/app/layouts/password-manager-logo.ts || die
+
+	eapply "${PATCH_FILE}"
+}
+
+src_compile() {
+	# mimicking https://contributing.bitwarden.com/getting-started/clients/
+	export \
+		npm_config_cache="${WORKDIR}"/npm-cache \
+		npm_config_nodedir="${EPREFIX}"/usr \
+		NODE_GYP_FORCE_PYTHON="${PYTHON}" \
+		ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
+		|| die
+	npm --verbose --offline clean-install || die
+
+	# mimicking the behaviour of https://github.com/dani-garcia/bw_web_builds/blob/master/scripts/build_web_vault.sh
+	pushd apps/web || die
+	npm --verbose --offline run dist:oss:selfhost && printf '{"version":"%s"}' "${PV}" | tee build/vw-version.json \
+			|| die "Build failed! Try prebuilt from upstream ${CATEGORY}/${PN}-bin"
+	# although following is optional in upstream's build process, it reduced build dir size from 44M to 25M
+	find build -name "*.map" -delete || die
+	popd || die
+}
+
+src_install() {
+	insinto /usr/share/webapps/"${PN}"
+	doins -r apps/web/build/*
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/
@ 2024-04-09 11:25 Julien Roy
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Roy @ 2024-04-09 11:25 UTC (permalink / raw
  To: gentoo-commits

commit:     82dfcfc9e6c144376b01d7b4d08448363652a42e
Author:     Rahil Bhimjiani <me <AT> rahil <DOT> rocks>
AuthorDate: Tue Apr  9 08:56:41 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Tue Apr  9 08:56:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=82dfcfc9

www-apps/vaultwarden-web: add bdeps for unpacking *.zst

Signed-off-by: Rahil Bhimjiani <me <AT> rahil.rocks>

 www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild
index ecff10e558..09f0947ed9 100644
--- a/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild
+++ b/www-apps/vaultwarden-web/vaultwarden-web-2024.3.1.ebuild
@@ -25,6 +25,7 @@ KEYWORDS="~amd64"
 RDEPEND="!www-apps/vaultwarden-web-bin"
 BDEPEND="
 	${PYTHON_DEPS}
+	$(unpacker_src_uri_depends)
 	net-libs/nodejs[npm]
 "
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-09 11:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 11:25 [gentoo-commits] repo/proj/guru:master commit in: www-apps/vaultwarden-web/ Julien Roy
  -- strict thread matches above, loose matches on Subject: below --
2024-04-08 21:32 Julien Roy
2024-03-28  3:43 Haelwenn Monnier
2024-03-27 11:50 Rui Huang
2024-02-26 16:30 Viorel Munteanu
2024-02-26 16:30 Viorel Munteanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox