From: ketlrznt <ketlrznt@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: v2raya-1.5.9.1698.1
Date: Mon, 08 Aug 2022 07:12:26 +0200 [thread overview]
Message-ID: <20220808051226.TVk6PfxGInR_Zt9UyPW3-ciuRbM3wI-a5eXKpgDTWEQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38528@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
There is an updated pull request by ketlrznt against master on the void-packages repository
https://github.com/ketlrznt/void-packages master
https://github.com/void-linux/void-packages/pull/38528
New package: v2raya-1.5.9.1698.1
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-LIBC)
A patch file from https://github.com/void-linux/void-packages/pull/38528.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-38528.patch --]
[-- Type: text/x-diff, Size: 13100 bytes --]
From faf0bf207b45656a4c92fd2ae8d85fc0b9bc491e Mon Sep 17 00:00:00 2001
From: ketlrznt <tansuanyinliao8888@gmail.com>
Date: Mon, 8 Aug 2022 10:19:39 +0800
Subject: [PATCH 1/2] add package: v2raya
---
srcpkgs/v2raya/files/v2raya/run | 11 +++++++++
srcpkgs/v2raya/template | 43 +++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+)
create mode 100644 srcpkgs/v2raya/files/v2raya/run
create mode 100644 srcpkgs/v2raya/template
diff --git a/srcpkgs/v2raya/files/v2raya/run b/srcpkgs/v2raya/files/v2raya/run
new file mode 100644
index 000000000000..7f53fbe90cdb
--- /dev/null
+++ b/srcpkgs/v2raya/files/v2raya/run
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+# v2raya config
+export V2RAYA_CONFIG=/etc/v2raya
+# v2raya log
+export V2RAYA_LOG_FILE=/var/log/v2raya/v2raya.log
+# v2ray router data
+export XDG_DATA_HOME="/usr/share"
+
+exec /usr/bin/v2raya
+
diff --git a/srcpkgs/v2raya/template b/srcpkgs/v2raya/template
new file mode 100644
index 000000000000..171caba94fa6
--- /dev/null
+++ b/srcpkgs/v2raya/template
@@ -0,0 +1,43 @@
+# Template file for 'v2raya'
+pkgname=v2raya
+version=1.5.9.1698.1
+revision=1
+wrksrc="v2rayA-${version}"
+build_style="go"
+go_import_path="github.com/v2rayA/v2rayA"
+go_ldflags='-X github.com/v2rayA/v2rayA/conf.Version=unstable-'"$version"' -s -w'
+hostmakedepends="go nodejs yarn"
+depends="v2ray>=4.37.0-1"
+short_desc="Web GUI client of Project V which supports various protocals"
+maintainer="ketlrznt <tansuanyinliao8888@gmail.com>"
+license="AGPL-3.0"
+homepage="https://github.com/v2rayA/v2rayA"
+distfiles="https://github.com/v2rayA/v2rayA/archive/v${version}.tar.gz"
+checksum="247a357230c616bf48309c61d119686e4ad56939c05afef584c45051e9dc6220"
+
+export GO11MODULE=on
+
+do_build() {
+ cd gui
+ yarn --check-files
+ OUTPUT_DIR="${wrksrc}/service/server/router/web" yarn build
+ cd ../service
+ go build -ldflags="$go_ldflags" -o "${GOPATH}/bin/v2raya"
+}
+
+do_install() {
+ # binary
+ vbin ${GOPATH}/bin/v2raya
+ # desktop entry
+ vinstall install/universal/v2raya.desktop 0644 usr/share/applications
+ # configurationo dir
+ vmkdir etc/$pkgname 0750
+ # service
+ vsv v2raya
+ # icon
+ vinstall gui/public/img/icons/android-chrome-512x512.png \
+ 0644 usr/share/icons/hicolor/512x512/apps/ v2raya.png
+ # license
+ vlicense LICENSE
+}
+
From 6e401ed433619ffd3d5681caf39b381f0c90f70e Mon Sep 17 00:00:00 2001
From: Subhaditya Nath <sn03.general@gmail.com>
Date: Sat, 6 Aug 2022 15:12:02 +0530
Subject: [PATCH 2/2] go: update to 1.19, add tests
---
srcpkgs/go/patches/fix-32bit-tests.patch | 13 ++
srcpkgs/go/patches/fix-musl-tests.patch | 29 +++++
srcpkgs/go/patches/fix-tests.patch | 150 +++++++++++++++++++++++
srcpkgs/go/template | 29 ++++-
4 files changed, 218 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/go/patches/fix-32bit-tests.patch
create mode 100644 srcpkgs/go/patches/fix-musl-tests.patch
create mode 100644 srcpkgs/go/patches/fix-tests.patch
diff --git a/srcpkgs/go/patches/fix-32bit-tests.patch b/srcpkgs/go/patches/fix-32bit-tests.patch
new file mode 100644
index 000000000000..f5d8083b19f0
--- /dev/null
+++ b/srcpkgs/go/patches/fix-32bit-tests.patch
@@ -0,0 +1,13 @@
+Fixes go1.19 error on i686 -
+ runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+
+--- a/go/src/cmd/go/script_test.go
++++ b/go/src/cmd/go/script_test.go
+@@ -148,6 +148,7 @@ var extraEnvKeys = []string{
+ "GO_TESTING_GOTOOLS", // for gccgo testing
+ "GCCGO", // for gccgo testing
+ "GCCGOTOOLDIR", // for gccgo testing
++ "CGO_CFLAGS", // for working around go1.19 "unknown symbol __stack_chk_fail_local" error on x86
+ }
+
+ // setup sets up the test execution temporary directory and environment.
diff --git a/srcpkgs/go/patches/fix-musl-tests.patch b/srcpkgs/go/patches/fix-musl-tests.patch
new file mode 100644
index 000000000000..f70cb456857b
--- /dev/null
+++ b/srcpkgs/go/patches/fix-musl-tests.patch
@@ -0,0 +1,29 @@
+These tests fail on musl because /proc/../status doesn't contain the "Groups"
+field, because musl lacks the getgroups() syscall.
+
+--- a/go/src/syscall/syscall_linux_test.go
++++ b/go/src/syscall/syscall_linux_test.go
+@@ -530,10 +530,6 @@ func TestSetuidEtc(t *testing.T) {
+ {call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
+ {call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
+
+- {call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
+- {call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
+- {call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
+-
+ {call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
+ {call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
+ {call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
+--- a/go/misc/cgo/test/issue1435.go
++++ b/go/misc/cgo/test/issue1435.go
+@@ -165,10 +165,6 @@ func test1435(t *testing.T) {
+ {call: "Setgid(1)", fn: func() error { return syscall.Setgid(1) }, filter: "Gid:", expect: "\t1\t1\t1\t1"},
+ {call: "Setgid(0)", fn: func() error { return syscall.Setgid(0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
+
+- {call: "Setgroups([]int{0,1,2,3})", fn: func() error { return syscall.Setgroups([]int{0, 1, 2, 3}) }, filter: "Groups:", expect: "\t0 1 2 3"},
+- {call: "Setgroups(nil)", fn: func() error { return syscall.Setgroups(nil) }, filter: "Groups:", expect: ""},
+- {call: "Setgroups([]int{0})", fn: func() error { return syscall.Setgroups([]int{0}) }, filter: "Groups:", expect: "\t0"},
+-
+ {call: "Setregid(101,0)", fn: func() error { return syscall.Setregid(101, 0) }, filter: "Gid:", expect: "\t101\t0\t0\t0"},
+ {call: "Setregid(0,102)", fn: func() error { return syscall.Setregid(0, 102) }, filter: "Gid:", expect: "\t0\t102\t102\t102"},
+ {call: "Setregid(0,0)", fn: func() error { return syscall.Setregid(0, 0) }, filter: "Gid:", expect: "\t0\t0\t0\t0"},
diff --git a/srcpkgs/go/patches/fix-tests.patch b/srcpkgs/go/patches/fix-tests.patch
new file mode 100644
index 000000000000..c93415611413
--- /dev/null
+++ b/srcpkgs/go/patches/fix-tests.patch
@@ -0,0 +1,150 @@
+Inside user namespaces, if GID == OVERFLOWGID (65534), then chown won't work.
+https://github.com/golang/go/issues/42525
+
+--- a/go/src/os/os_unix_test.go
++++ b/go/src/os/os_unix_test.go
+@@ -39,144 +39,6 @@ func checkUidGid(t *testing.T, path string, uid, gid int) {
+ }
+ }
+
+-func TestChown(t *testing.T) {
+- // Use TempDir() to make sure we're on a local file system,
+- // so that the group ids returned by Getgroups will be allowed
+- // on the file. On NFS, the Getgroups groups are
+- // basically useless.
+- f := newFile("TestChown", t)
+- defer Remove(f.Name())
+- defer f.Close()
+- dir, err := f.Stat()
+- if err != nil {
+- t.Fatalf("stat %s: %s", f.Name(), err)
+- }
+-
+- // Can't change uid unless root, but can try
+- // changing the group id. First try our current group.
+- gid := Getgid()
+- t.Log("gid:", gid)
+- if err = Chown(f.Name(), -1, gid); err != nil {
+- t.Fatalf("chown %s -1 %d: %s", f.Name(), gid, err)
+- }
+- sys := dir.Sys().(*syscall.Stat_t)
+- checkUidGid(t, f.Name(), int(sys.Uid), gid)
+-
+- // Then try all the auxiliary groups.
+- groups, err := Getgroups()
+- if err != nil {
+- t.Fatalf("getgroups: %s", err)
+- }
+- t.Log("groups: ", groups)
+- for _, g := range groups {
+- if err = Chown(f.Name(), -1, g); err != nil {
+- t.Fatalf("chown %s -1 %d: %s", f.Name(), g, err)
+- }
+- checkUidGid(t, f.Name(), int(sys.Uid), g)
+-
+- // change back to gid to test fd.Chown
+- if err = f.Chown(-1, gid); err != nil {
+- t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
+- }
+- checkUidGid(t, f.Name(), int(sys.Uid), gid)
+- }
+-}
+-
+-func TestFileChown(t *testing.T) {
+- // Use TempDir() to make sure we're on a local file system,
+- // so that the group ids returned by Getgroups will be allowed
+- // on the file. On NFS, the Getgroups groups are
+- // basically useless.
+- f := newFile("TestFileChown", t)
+- defer Remove(f.Name())
+- defer f.Close()
+- dir, err := f.Stat()
+- if err != nil {
+- t.Fatalf("stat %s: %s", f.Name(), err)
+- }
+-
+- // Can't change uid unless root, but can try
+- // changing the group id. First try our current group.
+- gid := Getgid()
+- t.Log("gid:", gid)
+- if err = f.Chown(-1, gid); err != nil {
+- t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
+- }
+- sys := dir.Sys().(*syscall.Stat_t)
+- checkUidGid(t, f.Name(), int(sys.Uid), gid)
+-
+- // Then try all the auxiliary groups.
+- groups, err := Getgroups()
+- if err != nil {
+- t.Fatalf("getgroups: %s", err)
+- }
+- t.Log("groups: ", groups)
+- for _, g := range groups {
+- if err = f.Chown(-1, g); err != nil {
+- t.Fatalf("fchown %s -1 %d: %s", f.Name(), g, err)
+- }
+- checkUidGid(t, f.Name(), int(sys.Uid), g)
+-
+- // change back to gid to test fd.Chown
+- if err = f.Chown(-1, gid); err != nil {
+- t.Fatalf("fchown %s -1 %d: %s", f.Name(), gid, err)
+- }
+- checkUidGid(t, f.Name(), int(sys.Uid), gid)
+- }
+-}
+-
+-func TestLchown(t *testing.T) {
+- // Use TempDir() to make sure we're on a local file system,
+- // so that the group ids returned by Getgroups will be allowed
+- // on the file. On NFS, the Getgroups groups are
+- // basically useless.
+- f := newFile("TestLchown", t)
+- defer Remove(f.Name())
+- defer f.Close()
+- dir, err := f.Stat()
+- if err != nil {
+- t.Fatalf("stat %s: %s", f.Name(), err)
+- }
+-
+- linkname := f.Name() + "2"
+- if err := Symlink(f.Name(), linkname); err != nil {
+- if runtime.GOOS == "android" && IsPermission(err) {
+- t.Skip("skipping test on Android; permission error creating symlink")
+- }
+- t.Fatalf("link %s -> %s: %v", f.Name(), linkname, err)
+- }
+- defer Remove(linkname)
+-
+- // Can't change uid unless root, but can try
+- // changing the group id. First try our current group.
+- gid := Getgid()
+- t.Log("gid:", gid)
+- if err = Lchown(linkname, -1, gid); err != nil {
+- if err, ok := err.(*PathError); ok && err.Err == syscall.ENOSYS {
+- t.Skip("lchown is unavailable")
+- }
+- t.Fatalf("lchown %s -1 %d: %s", linkname, gid, err)
+- }
+- sys := dir.Sys().(*syscall.Stat_t)
+- checkUidGid(t, linkname, int(sys.Uid), gid)
+-
+- // Then try all the auxiliary groups.
+- groups, err := Getgroups()
+- if err != nil {
+- t.Fatalf("getgroups: %s", err)
+- }
+- t.Log("groups: ", groups)
+- for _, g := range groups {
+- if err = Lchown(linkname, -1, g); err != nil {
+- t.Fatalf("lchown %s -1 %d: %s", linkname, g, err)
+- }
+- checkUidGid(t, linkname, int(sys.Uid), g)
+-
+- // Check that link target's gid is unchanged.
+- checkUidGid(t, f.Name(), int(sys.Uid), int(sys.Gid))
+- }
+-}
+-
+ // Issue 16919: Readdir must return a non-empty slice or an error.
+ func TestReaddirRemoveRace(t *testing.T) {
+ oldStat := *LstatP
diff --git a/srcpkgs/go/template b/srcpkgs/go/template
index 2db64b795ed8..a5fce0f153b6 100644
--- a/srcpkgs/go/template
+++ b/srcpkgs/go/template
@@ -1,17 +1,18 @@
# Template file for 'go'
pkgname=go
-version=1.18.3
+version=1.19
revision=1
create_wrksrc=yes
build_wrksrc=go
hostmakedepends="go1.12-bootstrap"
+checkdepends="iana-etc clang gcc-fortran"
short_desc="Go Programming Language"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://go.dev/"
changelog="https://go.dev/doc/devel/release.html"
distfiles="https://go.dev/dl/go${version}.src.tar.gz"
-checksum=0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d
+checksum=9419cc70dc5a2523f29a77053cafff658ed21ef3561d9b6b020280ebceab28b9
nostrip=yes
noverifyrdeps=yes
@@ -31,11 +32,24 @@ if [ "$CROSS_BUILD" ]; then
fi
fi
+# Workaround for go-1.19 compilation error on i686
+# runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel
+if [ "$XBPS_MACHINE" = i686 ]; then
+ export CGO_CFLAGS="-fno-stack-protector"
+fi
+
+post_extract() {
+ if [ "$(df . --output=fstype | tail -1)" = zfs ]; then
+ # https://github.com/golang/go/issues/39905
+ rm -v go/src/cmd/link/internal/ld/fallocate_test.go
+ fi
+}
+
do_build() {
unset GCC CC CXX LD CFLAGS
# FIXME: work around leaking go build-style vars when built as a
# dependency
- unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
+ unset CGO_CXXFLAGS CGO_ENABLED # CGO_CFLAGS
export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
export GOROOT=$PWD
@@ -47,6 +61,15 @@ do_build() {
bash make.bash -v
}
+do_check() {
+ if [ "$XBPS_LIBC" = musl ]; then
+ # https://github.com/golang/go/issues/39857
+ ./bin/go tool dist test -v -run "!^cgo_test$"
+ else
+ ./bin/go tool dist test -v
+ fi
+}
+
do_install() {
local bindir
next prev parent reply other threads:[~2022-08-08 5:12 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 2:28 [PR PATCH] " ketlrznt
2022-08-08 2:37 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 2:41 ` ketlrznt
2022-08-08 2:56 ` ketlrznt
2022-08-08 4:53 ` ketlrznt
2022-08-08 5:04 ` [PR REVIEW] " classabbyamp
2022-08-08 5:04 ` classabbyamp
2022-08-08 5:12 ` ketlrznt [this message]
2022-08-08 5:22 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 5:46 ` [PR REVIEW] " ketlrznt
2022-08-08 5:46 ` ketlrznt
2022-08-08 5:48 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 5:50 ` [PR REVIEW] " ketlrznt
2022-08-08 5:50 ` ketlrznt
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 6:16 ` classabbyamp
2022-08-08 8:04 ` cubercsl
2022-08-08 9:07 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 11:45 ` ketlrznt
2022-08-08 11:54 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 11:58 ` ketlrznt
2022-08-08 11:59 ` ketlrznt
2022-08-08 14:11 ` [PR REVIEW] " classabbyamp
2022-08-08 14:11 ` classabbyamp
2022-08-08 14:27 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 14:31 ` ketlrznt
2022-08-08 15:10 ` [PR REVIEW] " classabbyamp
2022-08-08 15:34 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 15:39 ` [PR PATCH] [Updated] New package: v2rayA-1.5.9.1698.1 ketlrznt
2022-08-08 15:40 ` ketlrznt
2022-08-08 15:41 ` ketlrznt
2022-08-08 15:47 ` [PR REVIEW] " classabbyamp
2022-08-08 15:54 ` [PR PATCH] [Updated] " ketlrznt
2022-08-08 15:57 ` classabbyamp
2022-08-08 16:03 ` ketlrznt
2022-08-09 0:58 ` ketlrznt
2022-08-09 1:23 ` ketlrznt
2022-08-09 2:24 ` [PR PATCH] [Updated] " ketlrznt
2022-08-09 2:27 ` ketlrznt
2022-08-09 2:29 ` [PR REVIEW] " classabbyamp
2022-08-09 2:33 ` [PR PATCH] [Updated] " ketlrznt
2022-08-09 2:34 ` ketlrznt
2022-08-09 3:06 ` ketlrznt
2022-08-10 19:23 ` [PR REVIEW] " classabbyamp
2022-08-10 23:25 ` [PR PATCH] [Updated] " ketlrznt
2022-08-10 23:26 ` classabbyamp
2022-08-10 23:29 ` [PR REVIEW] " classabbyamp
2022-08-11 0:39 ` [PR PATCH] [Updated] " ketlrznt
2022-08-11 0:39 ` ketlrznt
2022-08-28 13:11 ` [PR PATCH] [Updated] " ketlrznt
2022-08-28 13:19 ` ketlrznt
2022-08-28 13:20 ` ketlrznt
2022-08-28 13:26 ` ketlrznt
2022-09-11 1:41 ` [WIP for Update] " ketlrznt
2022-09-11 1:44 ` ketlrznt
2022-10-19 8:53 ` [PR PATCH] [Closed]: " ketlrznt
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=20220808051226.TVk6PfxGInR_Zt9UyPW3-ciuRbM3wI-a5eXKpgDTWEQ@z \
--to=ketlrznt@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).