Github messages for voidlinux
 help / color / mirror / Atom feed
From: ipkalm <ipkalm@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] v2ray: update to 5.4.0
Date: Tue, 28 Feb 2023 16:38:56 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42502@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]

There is a new pull request by ipkalm against master on the void-packages repository

https://github.com/ipkalm/void-packages v2ray-5.4.0_1
https://github.com/void-linux/void-packages/pull/42502

v2ray: update to 5.4.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686
  - i686-musl
  - aarch64
  - aarch64-musl
  - armv7l
  - armv7l-musl
  - armv6l
  - armv6l-musl
  - ppc64le


A patch file from https://github.com/void-linux/void-packages/pull/42502.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-v2ray-5.4.0_1-42502.patch --]
[-- Type: text/x-diff, Size: 3714 bytes --]

From 67496b0c7b0ac783e0991b10561183549904b36a Mon Sep 17 00:00:00 2001
From: ipkalm <ipkalm@outlook.com>
Date: Wed, 22 Feb 2023 09:58:26 +0700
Subject: [PATCH] v2ray: update to 5.4.0

---
 srcpkgs/v2ray/INSTALL.msg            |  2 ++
 srcpkgs/v2ray/REMOVE                 | 12 ++++++++++++
 srcpkgs/v2ray/files/README.voidlinux | 17 +++++++++++++++++
 srcpkgs/v2ray/files/v2ray/run        |  4 +++-
 srcpkgs/v2ray/template               |  8 ++++++--
 5 files changed, 40 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/v2ray/INSTALL.msg
 create mode 100644 srcpkgs/v2ray/REMOVE
 create mode 100644 srcpkgs/v2ray/files/README.voidlinux

diff --git a/srcpkgs/v2ray/INSTALL.msg b/srcpkgs/v2ray/INSTALL.msg
new file mode 100644
index 000000000000..09daaef1902d
--- /dev/null
+++ b/srcpkgs/v2ray/INSTALL.msg
@@ -0,0 +1,2 @@
+Consult /usr/share/doc/v2ray/README.voidlinux for additional configuration
+instructions.
diff --git a/srcpkgs/v2ray/REMOVE b/srcpkgs/v2ray/REMOVE
new file mode 100644
index 000000000000..c2c085849f70
--- /dev/null
+++ b/srcpkgs/v2ray/REMOVE
@@ -0,0 +1,12 @@
+#
+# This script removes /etc/v2ray directory only if it is empty
+# and not during package update
+#
+
+if [ "$UPDATE" = "no" ]; then
+        case "$ACTION" in
+        post)
+                [ -d etc/v2ray ] && rmdir etc/v2ray 2>/dev/null
+                ;;
+        esac
+fi
diff --git a/srcpkgs/v2ray/files/README.voidlinux b/srcpkgs/v2ray/files/README.voidlinux
new file mode 100644
index 000000000000..53d9cc2c5bfc
--- /dev/null
+++ b/srcpkgs/v2ray/files/README.voidlinux
@@ -0,0 +1,17 @@
+By default `v2ray` runit service uses /etc/v2ray/config.json config file. 
+
+For change command-line options for `v2ray` runit service,
+add '/etc/sv/v2ray/conf' file with 'OPTS=' variable.
+For example:
+
+        # echo 'OPTS="-config /etc/v2ray/second_config.json"' > /etc/sv/v2ray/conf
+
+Now `sv start v2ray` will use '/etc/v2ray/second_config.json' config file. For more information read `v2ray help run`. 
+
+For use environment variables add them to /etc/v2ray/env/ directory.
+For example:
+
+        # echo 'false' > /etc/v2ray/env/v2ray.vmess.aead.forced
+
+It adds environment variable 'v2ray.vmess.aead.forced=false' to `v2ray run` command.
+For more information read about '-e dir' option in `man chpst`.
diff --git a/srcpkgs/v2ray/files/v2ray/run b/srcpkgs/v2ray/files/v2ray/run
index 2910b070fb90..4fcce104be3f 100644
--- a/srcpkgs/v2ray/files/v2ray/run
+++ b/srcpkgs/v2ray/files/v2ray/run
@@ -1,4 +1,6 @@
 #!/bin/sh
 exec 2>&1
 
-exec chpst -u _v2ray v2ray run -config=/etc/v2ray/config.json 2>&1
+[ -r conf ] && . ./conf
+
+exec chpst -e /etc/v2ray/env -u _v2ray v2ray run ${OPTS:- -config=/etc/v2ray/config.json} 2>&1
diff --git a/srcpkgs/v2ray/template b/srcpkgs/v2ray/template
index 27dee8754f7e..cf05f005fd41 100644
--- a/srcpkgs/v2ray/template
+++ b/srcpkgs/v2ray/template
@@ -1,6 +1,6 @@
 # Template file for 'v2ray'
 pkgname=v2ray
-version=5.3.0
+version=5.4.0
 revision=1
 build_style=go
 go_import_path="github.com/v2fly/v2ray-core/v5"
@@ -12,7 +12,8 @@ maintainer="ipkalm <ipkalm@outlook.com>"
 license="MIT"
 homepage="https://github.com/v2fly/v2ray-core"
 distfiles="https://github.com/v2fly/v2ray-core/archive/v${version}/${pkgname}-${version}.tar.gz"
-checksum=8e97e2647cb1dee8aa7e71df276c56d74258b2d97bb490a362afa84bdf1b9e25
+checksum=86be35461a9dc7d037e0045771d99f1eae284fdb7aa0818a6782d18b6b003fca
+make_dirs="/etc/v2ray/env 0755 root root"
 conf_files="/etc/v2ray/config.json"
 
 system_accounts="_v2ray"
@@ -49,4 +50,7 @@ post_install() {
 	vmkdir etc/v2ray
 	vcopy release/config/*.json etc/v2ray/
 	vsv v2ray
+
+	# Void-specific documentation.
+	vdoc "${FILESDIR}/README.voidlinux"
 }

             reply	other threads:[~2023-02-28 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 15:38 ipkalm [this message]
2023-02-28 15:47 ` ipkalm
2023-02-28 15:47 ` ipkalm
2023-02-28 15:52 ` ipkalm
2023-03-20 23:01 ` [PR PATCH] [Updated] " ipkalm
2023-04-23  3:59 ` ipkalm
2023-04-23  4:01 ` [PR PATCH] [Closed]: v2ray: update to 5.4.1 ipkalm
2023-06-25 19:10 ` [PR REVIEW] " Duncaen
2023-06-25 19:10 ` Duncaen
2023-06-25 19:10 ` Duncaen
2023-06-25 19:10 ` Duncaen
2023-09-24  1:45 ` github-actions
2023-12-24  1:47 ` github-actions
2024-01-07  1:49 ` [PR PATCH] [Closed]: " github-actions

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42502@inbox.vuxu.org \
    --to=ipkalm@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).