Github messages for voidlinux
 help / color / mirror / Atom feed
From: kruceter <kruceter@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] EternalTerminal: update to 6.2.4.
Date: Mon, 23 Jan 2023 20:15:59 +0100	[thread overview]
Message-ID: <20230123191559.hCI0row-A--zSPIHpG9_DoMWx9O95JK3h-mqk0OB88w@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41823@inbox.vuxu.org>

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

There is an updated pull request by kruceter against master on the void-packages repository

https://github.com/kruceter/void-packages eternalterminal
https://github.com/void-linux/void-packages/pull/41823

EternalTerminal: update to 6.2.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### 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, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-eternalterminal-41823.patch --]
[-- Type: text/x-diff, Size: 9725 bytes --]

From 22d4bde2498cacfac222c04a3027a8a2317d0b15 Mon Sep 17 00:00:00 2001
From: Krul Ceter <kruceter@proton.me>
Date: Sat, 21 Jan 2023 08:36:07 +0300
Subject: [PATCH] EternalTerminal: update to 6.2.4.

* replace disable_testing.patch with upstream build_testing.patch in
  order to properly disable building tests with the "BUILD_TESTING"
  flag.

* bundled cxxopts is broken with GCC 12; patch to use the packaged one.

* gcc complains at "string"/"vector" not having a type in
  src/base/TunnelUtils.(hpp|cpp); patch the header file.

* clean up the mess made with build_wrksrc in the previous commit.
---
 .../patches/build_testing.patch               | 89 +++++++++++++++++++
 srcpkgs/EternalTerminal/patches/cxxopts.patch | 34 +++++++
 .../patches/disable-tests.patch               | 30 -------
 .../EternalTerminal/patches/fix-cflags.patch  |  4 +-
 .../EternalTerminal/patches/tunnelutils.patch | 13 +++
 srcpkgs/EternalTerminal/template              | 21 +++--
 6 files changed, 148 insertions(+), 43 deletions(-)
 create mode 100644 srcpkgs/EternalTerminal/patches/build_testing.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/cxxopts.patch
 delete mode 100644 srcpkgs/EternalTerminal/patches/disable-tests.patch
 create mode 100644 srcpkgs/EternalTerminal/patches/tunnelutils.patch

diff --git a/srcpkgs/EternalTerminal/patches/build_testing.patch b/srcpkgs/EternalTerminal/patches/build_testing.patch
new file mode 100644
index 000000000000..3ba509d228df
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/build_testing.patch
@@ -0,0 +1,89 @@
+https://github.com/MisterTea/EternalTerminal/pull/562.patch
+
+From d39008320d401264770636abe9d77ba69e65c620 Mon Sep 17 00:00:00 2001
+From: Krul Ceter <kruceter@proton.me>
+Date: Sat, 21 Jan 2023 07:36:17 +0300
+Subject: [PATCH] Add BUILD_TESTING to make tests optional by choice
+
+The option is enabled by default, so it should not disrupt the default
+behavior.
+---
+ CMakeLists.txt | 48 ++++++++++++++++++++++++++----------------------
+ 1 file changed, 26 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ef239d3e..2368dfc2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -165,6 +165,7 @@ endif()
+ 
+ option(CODE_COVERAGE "Enable code coverage" OFF)
+ option(FUZZING "Enable builds for fuzz testing" OFF)
++option(BUILD_TESTING "Build tests" ON)
+ option(DISABLE_CRASH_LOG "Disable installing easylogging crash handler" OFF)
+ 
+ add_definitions(-DET_VERSION="${PROJECT_VERSION}")
+@@ -521,30 +522,33 @@ else(WIN32)
+       ${CORE_LIBRARIES})
+   decorate_target(htmd)
+ 
+-  enable_testing()
++  if(BUILD_TESTING)
++    enable_testing()
+ 
+-  file(GLOB TEST_SRCS test/*Test.cpp)
+-  add_executable(
+-  et-test
+-  ${TEST_SRCS}
+-  test/Main.cpp
+-  )
+-  add_dependencies(et-test TerminalCommon et-lib)
+-  target_link_libraries(
++    file(GLOB TEST_SRCS test/*Test.cpp)
++    add_executable(
+     et-test
+-    TerminalCommon
+-    et-lib
+-    ${CMAKE_THREAD_LIBS_INIT}
+-    ${PROTOBUF_LIBS}
+-    ${sodium_LIBRARY_RELEASE}
+-    ${SELINUX_LIBRARIES}
+-    ${UTEMPTER_LIBRARIES}
+-    ${Boost_LIBRARIES}
+-      ${CORE_LIBRARIES})
+-  add_test(et-test et-test)
+-  decorate_target(et-test)
++    ${TEST_SRCS}
++    test/Main.cpp
++    )
+ 
+-  if(FUZZING)
++    add_dependencies(et-test TerminalCommon et-lib)
++    target_link_libraries(
++      et-test
++      TerminalCommon
++      et-lib
++      ${CMAKE_THREAD_LIBS_INIT}
++      ${PROTOBUF_LIBS}
++      ${sodium_LIBRARY_RELEASE}
++      ${SELINUX_LIBRARIES}
++      ${UTEMPTER_LIBRARIES}
++      ${Boost_LIBRARIES}
++        ${CORE_LIBRARIES})
++    add_test(et-test et-test)
++    decorate_target(et-test)
++  endif()
++
++  if(BUILD_TESTING AND FUZZING)
+     add_executable(
+     TerminalServerFuzzer
+     test/TerminalServerFuzzer.cpp
+@@ -582,7 +586,7 @@ else(WIN32)
+       ${Boost_LIBRARIES}
+         ${CORE_LIBRARIES})
+     decorate_fuzzer(TerminalServerRouterFuzzer)
+-  endif(FUZZING)
++  endif(BUILD_TESTING AND FUZZING)
+ 
+   install(
+     TARGETS etserver etterminal et htm htmd
diff --git a/srcpkgs/EternalTerminal/patches/cxxopts.patch b/srcpkgs/EternalTerminal/patches/cxxopts.patch
new file mode 100644
index 000000000000..1fcbf57f759d
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/cxxopts.patch
@@ -0,0 +1,34 @@
+Bundled cxxopts is outdated to the point where it cannot build with
+GCC 12.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,6 +98,7 @@ find_package(Threads REQUIRED)
+ find_package(sodium REQUIRED)
+ find_package(Protobuf REQUIRED)
+ find_package(ZLIB REQUIRED)
++find_package(cxxopts)
+ find_package(Unwind)
+ 
+ # Optional packages
+@@ -278,6 +279,12 @@ else()
+       stdc++fs)
+ endif()
+ 
++if(cxxopts_FOUND)
++  list(INSERT CORE_LIBRARIES 0 cxxopts::cxxopts)
++else()
++  include_directories(${EXTERNAL_DIR}/cxxopts/include)
++endif()
++
+ IF(Unwind_FOUND)
+   list(INSERT CORE_LIBRARIES 0 unwind::unwind)
+ ENDIF()
+@@ -322,7 +329,6 @@ include_directories(
+   ${EXTERNAL_DIR}/ThreadPool
+   ${EXTERNAL_DIR}/PlatformFolders
+   ${EXTERNAL_DIR}/Catch2/single_include
+-  ${EXTERNAL_DIR}/cxxopts/include
+   ${EXTERNAL_DIR}/msgpack-c/include
+   ${EXTERNAL_DIR}/json/single_include/nlohmann
+   ${EXTERNAL_DIR}/sole
diff --git a/srcpkgs/EternalTerminal/patches/disable-tests.patch b/srcpkgs/EternalTerminal/patches/disable-tests.patch
deleted file mode 100644
index f7dcee020b9b..000000000000
--- a/srcpkgs/EternalTerminal/patches/disable-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
-@@ -519,17 +519,8 @@
-       ${CORE_LIBRARIES})
-   decorate_target(htmd)
- 
--  enable_testing()
--
--  file(GLOB TEST_SRCS test/*Test.cpp)
--  add_executable(
--  et-test
--  ${TEST_SRCS}
--  test/Main.cpp
--  )
--  add_dependencies(et-test TerminalCommon et-lib)
-+  add_dependencies(TerminalCommon et-lib)
-   target_link_libraries(
--    et-test
-     TerminalCommon
-     et-lib
-     ${CMAKE_THREAD_LIBS_INIT}
-@@ -539,8 +530,6 @@
-     ${UTEMPTER_LIBRARIES}
-     ${Boost_LIBRARIES}
-       ${CORE_LIBRARIES})
--  add_test(et-test et-test)
--  decorate_target(et-test)
- 
-   if(FUZZING)
-     add_executable(
diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
index 952005b1bd48..ce7e998804ee 100644
--- a/srcpkgs/EternalTerminal/patches/fix-cflags.patch
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -1,7 +1,7 @@
 Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
 ===================================================================
---- a/EternalTerminal/CMakeLists.txt
-+++ b/EternalTerminal/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
 @@ -187,12 +187,6 @@
        "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
  endif(DISABLE_CRASH_LOG)
diff --git a/srcpkgs/EternalTerminal/patches/tunnelutils.patch b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
new file mode 100644
index 000000000000..d2c4ee19ee1a
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/tunnelutils.patch
@@ -0,0 +1,13 @@
+Does not build without including this header (mostly complains about
+"string" or "vector" not having a type).
+
+--- a/src/base/TunnelUtils.hpp
++++ b/src/base/TunnelUtils.hpp
+@@ -1,6 +1,7 @@
+ #ifndef __ET_TUNNEL_UTILS__
+ #define __ET_TUNNEL_UTILS__
+ 
++#include "Headers.hpp"
+ #include "ETerminal.pb.h"
+ 
+ namespace et {
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 1017a1b4a1ec..c4a1776c2d1c 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -1,25 +1,25 @@
 # Template file for 'EternalTerminal'
 pkgname=EternalTerminal
-version=6.2.1
+version=6.2.4
 revision=1
 # revisions used for the specific versions of submodules.
 # they can be found in the external/ directory of the source code.
 _sanitizers_gitrev="99e159ec9bc8dd362b08d18436bd40ff0648417b"
 _threadpool_gitrev="9a42ec1329f259a5f4881a291db1dcb8f2ad9040"
-build_wrksrc=${pkgname}
 build_style=cmake
-configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON"
-hostmakedepends="protobuf"
+configure_args="-DDISABLE_VCPKG=ON -DDISABLE_TELEMETRY=ON -DDISABLE_SENTRY=ON
+ -DBUILD_TESTING=OFF"
+hostmakedepends="protobuf pkg-config"
 makedepends="gflags-devel libsodium-devel protobuf-devel openssl-devel
- zlib-devel"
+ zlib-devel cxxopts"
 short_desc="Re-Connectable secure remote shell"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://eternalterminal.dev/"
-distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz
+distfiles="https://github.com/MisterTea/EternalTerminal/archive/refs/tags/et-v${version}.tar.gz
  https://github.com/arsenm/sanitizers-cmake/archive/${_sanitizers_gitrev}.tar.gz
  https://github.com/progschj/ThreadPool/archive/${_threadpool_gitrev}.tar.gz"
-checksum="fdf68a51cb8b62b3dbbacd1d2aeba5d5491e5142e65c97713c2f1ce61d4fdbed
+checksum="95cfb79bc2f25d19eb84ca3c28dba860bb52b3750334d373adeb2cd061de6ba6
  f9cf386638f455c5d2e7a835b95941201387d2531b8682942d59827663b58341
  954e0ecdac1aa0da1e0fa78577ff0d352e53094df43762fbc1884f76a7e1dcd2"
 system_accounts="_eternal"
@@ -38,10 +38,9 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 fi
 
 post_extract() {
-	mv EternalTerminal-et-v${version} ${build_wrksrc}
-	mv sanitizers-cmake-${_sanitizers_gitrev}/* \
-		${build_wrksrc}/external/sanitizers-cmake
-	mv ThreadPool-${_threadpool_gitrev}/* ${build_wrksrc}/external/ThreadPool
+	mv EternalTerminal-et-v${version}/* .
+	mv sanitizers-cmake-${_sanitizers_gitrev}/* external/sanitizers-cmake
+	mv ThreadPool-${_threadpool_gitrev}/* external/ThreadPool
 }
 
 post_patch() {

  reply	other threads:[~2023-01-23 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 15:25 [PR PATCH] " kruceter
2023-01-23 19:15 ` kruceter [this message]
2023-01-27 13:25 ` [PR PATCH] [Updated] " liarimu
2023-02-02  2:48 ` kruceter
2023-02-02  7:40 ` kruceter
2023-02-08 23:53 ` [PR PATCH] [Closed]: " kruceter

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=20230123191559.hCI0row-A--zSPIHpG9_DoMWx9O95JK3h-mqk0OB88w@z \
    --to=kruceter@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).