Replace version tag patch with new-ish cmake option

opensuse/tumbleweed
Jason Rhinelander 11 months ago
parent 496d20b6df
commit 5ce981352e
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

@ -1,16 +0,0 @@
diff --git a/llarp/config/config.cpp b/llarp/config/config.cpp
index 78d152602..8b07b0cec 100644
--- a/llarp/config/config.cpp
+++ b/llarp/config/config.cpp
@@ -703,7 +703,10 @@ namespace llarp
// can bind to other 127.* IPs to avoid conflicting with something else that may be listening on
// 127.0.0.1:53.
#ifdef __linux__
- constexpr Default DefaultDNSBind{"127.3.2.1:53"};
+ // Fedora's systemd-resolved seems unable to connect to 127.3.2.1 for unknown reasons,
+ // however since systemd-resolved is perfectly happy with a different port so listen on
+ // localhost:953 as a workaround.
+ constexpr Default DefaultDNSBind{"127.0.0.1:953"};
#else
constexpr Default DefaultDNSBind{"127.0.0.1:53"};
#endif

@ -1,28 +0,0 @@
From: Jason Rhinelander <jason@imaginary.ca>
Date: Fri, 13 Dec 2019 17:23:41 -0400
Subject: Pass debian version as GIT_VERSION
---
cmake/Version.cmake | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
index 45037a0..d9fdaef 100644
--- a/cmake/Version.cmake
+++ b/cmake/Version.cmake
@@ -1,4 +1,8 @@
+if(GIT_VERSION)
+ set(VERSIONTAG "${GIT_VERSION}")
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp")
+else()
find_package(Git QUIET)
set(GIT_INDEX_FILE "${PROJECT_SOURCE_DIR}/.git/index")
if(EXISTS ${GIT_INDEX_FILE} AND ( GIT_FOUND OR Git_FOUND) )
@@ -18,5 +22,6 @@ else()
set(VERSIONTAG "nogit")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp")
endif()
+endif()
add_custom_target(genversion DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp")

@ -22,9 +22,6 @@ BuildRequires: libcurl-devel
BuildRequires: jemalloc-devel
BuildRequires: sqlite3-devel
# Puts the rpm version instead of the git tag in the version string:
Patch1: version-as-rpm-version.patch
Requires: lokinet-bin = %{version}-%{release}
%{?systemd_requires}
@ -81,7 +78,7 @@ export CFLAGS="%{optflags} -march=armv6 -mtune=cortex-a53 -mfloat-abi=hard -mfpu
%endif
%undefine __cmake_in_source_build
%cmake -DNATIVE_BUILD=OFF -DUSE_AVX2=OFF -DWITH_TESTS=OFF %{cmake_extra_args} -DCMAKE_BUILD_TYPE=Release -DGIT_VERSION="%{release}" -DWITH_SETCAP=OFF -DSUBMODULE_CHECK=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_LIBLOKINET=OFF
%cmake -DNATIVE_BUILD=OFF -DUSE_AVX2=OFF -DWITH_TESTS=OFF %{cmake_extra_args} -DCMAKE_BUILD_TYPE=Release -DLOKINET_VERSIONTAG="%{release}" -DWITH_SETCAP=OFF -DSUBMODULE_CHECK=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_LIBLOKINET=OFF
%cmake_build
%install
@ -157,6 +154,7 @@ systemctl enable --now lokinet
* Sat Jun 03 2023 Jason Rhinelander <jason@imaginary.ca> - 0.9.11-1
- bump version
- fix use of `--badnames` instead of `--badname`
- drop version tag patch; there is a cmake option for that now
* Wed Nov 17 2021 Technical Tumbleweed <necro_nemesis@hotmail.com> - 0.9.8-1
- bump version

Loading…
Cancel
Save