Bug 273637 - security/xray-core: Update to 1.8.4
Summary: security/xray-core: Update to 1.8.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joel Bodenmann
URL: https://www.freshports.org/security/x...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-08 13:04 UTC by Nik
Modified: 2023-09-25 19:25 UTC (History)
3 users (show)

See Also:
kirill: maintainer-feedback+
kirill: maintainer-feedback+


Attachments
requested diff file (2.89 KB, patch)
2023-09-11 22:15 UTC, Nik
no flags Details | Diff
Xray-Core update from 1.7.5 to 1.8.4 stable version (3.50 KB, patch)
2023-09-12 02:40 UTC, Kirill Lebedev
kirill: maintainer-approval-
Details | Diff
Xray update to 1.8.4 with pkg-list fix (3.83 KB, patch)
2023-09-20 04:49 UTC, Kirill Lebedev
kirill: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nik 2023-09-08 13:04:23 UTC
diff -u /usr/ports/security/xray-core/Makefile ./Makefile
--- /usr/ports/security/xray-core/Makefile	2023-09-01 20:26:00.000000000 +0000
+++ ./Makefile	2023-09-08 12:45:56.086712000 +0000
@@ -1,9 +1,9 @@
 PORTNAME=	xray-core
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.7.5
+DISTVERSION=	1.8.4
 CATEGORIES=	security
-MASTER_SITES=	https://github.com/v2ray/geoip/releases/download/202308310037/:geoip \
-		https://github.com/v2ray/domain-list-community/releases/download/20230825070717/:geosite
+MASTER_SITES=	https://github.com/v2ray/geoip/releases/download/202309070036/:geoip \
+		https://github.com/v2ray/domain-list-community/releases/download/20230905081311/:geosite
 DISTFILES=	geoip.dat:geoip \
 		dlc.dat:geosite
 EXTRACT_ONLY=	v${DISTVERSION}.zip \
diff -u /usr/ports/security/xray-core/distinfo ./distinfo
--- /usr/ports/security/xray-core/distinfo	2023-09-01 20:15:57.000000000 +0000
+++ ./distinfo	2023-09-08 11:39:12.965591000 +0000
@@ -1,11 +1,11 @@
-TIMESTAMP = 1693528419
-SHA256 (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/geoip.dat) = 536d7aa9f54af747153d4f982adaa3181025dd72faaba8f532b3f514b467eff8
-SIZE (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/geoip.dat) = 10591274
-SHA256 (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/dlc.dat) = 231a6fb4915f7652ad9b2027965fbbb27435ffa9b3a0734ad2b69693e95d6604
-SIZE (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/dlc.dat) = 1594785
-SHA256 (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/v1.7.5.mod) = 6d45a243922836e2422095192b0bd4948745147aef4cfc7883d440307bfbde1b
-SIZE (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/v1.7.5.mod) = 2480
-SHA256 (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/v1.7.5.zip) = e2c2338ce24ba15d9f7cc93686e06e1fb15a33a345e5fa5d4f28a345dffb9014
-SIZE (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/v1.7.5.zip) = 970336
-SHA256 (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/xtls-Xray-core-v1.7.5_GH0.tar.gz) = a5fc936136a57a463bf9a895d068fdfa895b168ae6093c58a10208e098b6b2d3
-SIZE (go/security_xray-core/xtls-Xray-core-v1.7.5_GH0/xtls-Xray-core-v1.7.5_GH0.tar.gz) = 579098
+TIMESTAMP = 1694173152
+SHA256 (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/geoip.dat) = 4623aa0a0d13e4dd14c4f81fe054471e02e83c16700e326c0a924ce7c0177c69
+SIZE (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/geoip.dat) = 10637206
+SHA256 (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/dlc.dat) = d393deda756a446ec5247730ef09fed80ba9fb8d9204d1263c45a3604435fe57
+SIZE (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/dlc.dat) = 1596408
+SHA256 (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/v1.8.4.mod) = 16d746081094c455a61ed29db9ded0b4d83d3c0ddc75a1aa76d1c4a84457c417
+SIZE (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/v1.8.4.mod) = 2391
+SHA256 (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/v1.8.4.zip) = 16defb1d9114613e2e2c4f6a7fa36ac08569c84a7782c3fbcf6d4533e7a535d9
+SIZE (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/v1.8.4.zip) = 973031
+SHA256 (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/xtls-Xray-core-v1.8.4_GH0.tar.gz) = 89f73107abba9bd438111edfe921603ddb3c2b631b2716fbdc6be78552f0d322
+SIZE (go/security_xray-core/xtls-Xray-core-v1.8.4_GH0/xtls-Xray-core-v1.8.4_GH0.tar.gz) = 583305
Common subdirectories: /usr/ports/security/xray-core/files and ./files
Only in .: work
Comment 1 Graham Perrin 2023-09-08 13:39:25 UTC
See also: bug 269306

> security/xray-core: Update to 1.7.3, cleanup


Incidentally, <https://github.com/v2ray/geoip/#readme> begins, emphatically: 

> Move To https://github.com/v2fly/geoip

Is that relevant to either 269306 or 273637?
Comment 2 Kirill Lebedev 2023-09-08 23:40:38 UTC
Graham / Nik - Please:

1. Update GeoData and SiteDB repositories from v2ray to v2fly, as Graham mentioned below. It was missed on the previous port update
2. Include a patch or diff files as an attachment to simplify testing. 

I will review/validate the changes after that.
Comment 3 Nik 2023-09-11 22:15:23 UTC
Created attachment 244780 [details]
requested diff file
Comment 4 Kirill Lebedev 2023-09-12 02:37:30 UTC
Comment on attachment 244780 [details]
requested diff file

The domain site is not migrated to v2fly. I will upload my own patch
Comment 5 Kirill Lebedev 2023-09-12 02:40:51 UTC
Created attachment 244785 [details]
Xray-Core update from 1.7.5 to 1.8.4 stable version

New patch that does:
1. Xray-Core version bump to 1.8.4
2. geoip data migration from v2ray to v2fly github project based on repo guidance
3. domain-list data migration from v2ray to v2fly github project based on repo guidance
Comment 6 Kirill Lebedev 2023-09-12 04:22:54 UTC
Changes made in Xray patch file:
1. Xray-Core version bump to 1.8.4
2. geoip data migration from v2ray to v2fly github project based on repo guidance
3. domain-list data migration from v2ray to v2fly github project based on repo guidance

Testing done:
1. portlint is Clear.
2. Port install creates all required files
3. The new version of xray starts with default configs generated with no issues
4. Log files are created with proper permissions set.
5. Service is registered correctly.
Comment 7 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-18 22:48:21 UTC
poudriere-testport seems to fail on check-plist:

Error: Missing: etc/rc.d/xray
Comment 8 Kirill Lebedev 2023-09-20 04:49:42 UTC
Created attachment 245035 [details]
Xray update to 1.8.4 with pkg-list fix
Comment 9 Kirill Lebedev 2023-09-20 04:52:36 UTC
(In reply to Joel Bodenmann from comment #7)

Pkg list file is fixed. poudriere-testport ran successfully.
Comment 10 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-20 14:32:20 UTC
Unless I'm missing something this means that the port previously shipped with an rc.d script and now doesn't anymore. Is that correct?
Did upstream ship an rc.d script previously and no longer does that?
Comment 11 Kirill Lebedev 2023-09-20 16:36:42 UTC
(In reply to Joel Bodenmann from comment #10)

rc.d script is not from upstream. I created it as a part of 1.7.5 update. Script still exists and being installed with the port. It is templatized and located in files/xray.in

I accidentally added it to pkg-list in previous version while it is not required based on my understanding of template system. I clearly see rc.d templated scripts not to be part of pkg-list in other ports. I validated the port still installs/removes script properly without any errors.
Comment 12 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-25 14:24:43 UTC
Are the two *.dat files required during build? I removed the copying of those files from the post-extract stage and instead copied the *.dat files directly from DISTDIR in post-install. It seems to build just fine but it would be nice to know whether this is okay before I commit this.
Comment 13 Kirill Lebedev 2023-09-25 15:52:42 UTC
(In reply to Joel Bodenmann from comment #12)

This is OK. GeoData files are not built dependencies. But they are required in runtime.
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-09-25 19:23:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7ec52b3838f07e6fad4943c2fe2dde1f5d961f00

commit 7ec52b3838f07e6fad4943c2fe2dde1f5d961f00
Author:     Kirill Lebedev <kirill@drlebedev.com>
AuthorDate: 2023-09-25 11:24:05 +0000
Commit:     Joel Bodenmann <jbo@FreeBSD.org>
CommitDate: 2023-09-25 19:18:39 +0000

    security/xray-core: Update to 1.8.4

    Changelogs:
      1.8.4: https://github.com/XTLS/Xray-core/releases/tag/v1.8.4
      1.8.3: https://github.com/XTLS/Xray-core/releases/tag/v1.8.3
      1.8.1: https://github.com/XTLS/Xray-core/releases/tag/v1.8.1
      1.8.0: https://github.com/XTLS/Xray-core/releases/tag/v1.8.0

    PR:                     273637
    Approved by:            zirias (mentor)
    Differential Revision:  https://reviews.freebsd.org/D41972

 security/xray-core/Makefile  | 15 +++++----------
 security/xray-core/distinfo  | 22 +++++++++++-----------
 security/xray-core/pkg-plist |  1 -
 3 files changed, 16 insertions(+), 22 deletions(-)
Comment 15 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-25 19:25:28 UTC
Committed - Thanks!