-
Notifications
You must be signed in to change notification settings - Fork 2
/
arch-ftl-5.25.2-1.patch
115 lines (99 loc) · 6.19 KB
/
arch-ftl-5.25.2-1.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
diff -uprN FTL-5.25.2/src/CMakeLists.txt FTL-5.25.2.cust/src/CMakeLists.txt
--- FTL-5.25.2/src/CMakeLists.txt 2024-05-08 21:59:50.000000000 +0200
+++ FTL-5.25.2.cust/src/CMakeLists.txt 2024-05-09 13:51:35.628439194 +0200
@@ -30,7 +30,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PRO
# SQLITE_OMIT_DESERIALIZE: This option causes the the sqlite3_serialize() and sqlite3_deserialize() interfaces to be omitted from the build (was the default before 3.36.0)
# HAVE_READLINE: Enable readline support to allow easy editing, history and auto-completion
# SQLITE_DEFAULT_CACHE_SIZE=-16384: Allow up to 16 MiB of cache to be used by SQLite3 (default is 2000 kiB)
-set(SQLITE_DEFINES "-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_DEFAULT_FOREIGN_KEYS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_OMIT_DESERIALIZE -DHAVE_READLINE -DSQLITE_DEFAULT_CACHE_SIZE=-16384")
+set(SQLITE_DEFINES "-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_DEFAULT_FOREIGN_KEYS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_OMIT_DESERIALIZE -DSQLITE_DEFAULT_CACHE_SIZE=-16384")
# Code hardening and debugging improvements
# -fstack-protector-strong: The program will be resistant to having its stack overflowed
@@ -85,7 +85,7 @@ if(CMAKE_C_COMPILER_VERSION VERSION_EQUA
else()
set(EXTRAWARN_GCC8 "")
endif()
-set(EXTRAWARN "-Werror -Waddress -Wlogical-op -Wmissing-field-initializers -Woverlength-strings -Wformat -Wformat-nonliteral -Wuninitialized -Wswitch-enum -Wshadow -Wfloat-equal -Wbad-function-cast -Wwrite-strings -Wparentheses -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Winline ${EXTRAWARN_GCC8}")
+set(EXTRAWARN "-Waddress -Wlogical-op -Wmissing-field-initializers -Woverlength-strings -Wformat -Wformat-nonliteral -Wuninitialized -Wswitch-enum -Wshadow -Wfloat-equal -Wbad-function-cast -Wwrite-strings -Wparentheses -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Winline ${EXTRAWARN_GCC8}")
separate_arguments(EXTRAWARN)
# Do we want to compile a statically linked musl executable?
@@ -193,10 +193,10 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
# for DNSSEC we need the nettle (+ hogweed) crypto and the gmp math libraries
-find_library(LIBHOGWEED NAMES libhogweed${CMAKE_STATIC_LIBRARY_SUFFIX} hogweed)
-find_library(LIBGMP NAMES libgmp${CMAKE_STATIC_LIBRARY_SUFFIX} gmp)
-find_library(LIBNETTLE NAMES libnettle${CMAKE_STATIC_LIBRARY_SUFFIX} nettle)
-find_library(LIBIDN NAMES libidn${CMAKE_STATIC_LIBRARY_SUFFIX} idn)
+find_library(LIBHOGWEED NAMES libhogweed${CMAKE_SHARED_LIBRARY_SUFFIX} hogweed)
+find_library(LIBGMP NAMES libgmp${CMAKE_SHARED_LIBRARY_SUFFIX} gmp)
+find_library(LIBNETTLE NAMES libnettle${CMAKE_SHARED_LIBRARY_SUFFIX} nettle)
+find_library(LIBIDN NAMES libidn${CMAKE_SHARED_LIBRARY_SUFFIX} idn)
target_link_libraries(pihole-FTL rt Threads::Threads ${LIBHOGWEED} ${LIBGMP} ${LIBNETTLE} ${LIBIDN})
@@ -205,9 +205,9 @@ if(LUA_DL STREQUAL "true")
target_link_libraries(pihole-FTL ${LIBDL})
endif()
-find_library(LIBREADLINE NAMES libreadline${CMAKE_STATIC_LIBRARY_SUFFIX} readline)
-find_library(LIBHISTORY NAMES libhistory${CMAKE_STATIC_LIBRARY_SUFFIX} history)
-find_library(LIBTERMCAP NAMES libtermcap${CMAKE_STATIC_LIBRARY_SUFFIX} termcap)
+find_library(LIBREADLINE NAMES libreadline${CMAKE_SHARED_LIBRARY_SUFFIX} readline)
+find_library(LIBHISTORY NAMES libhistory${CMAKE_SHARED_LIBRARY_SUFFIX} history)
+find_library(LIBTERMCAP NAMES libtermcap${CMAKE_SHARED_LIBRARY_SUFFIX} termcap)
if(LIBREADLINE AND LIBHISTORY AND LIBTERMCAP)
message(STATUS "Building FTL with readline support: YES")
target_compile_definitions(FTL PRIVATE LUA_USE_READLINE)
diff -uprN FTL-5.25.2/src/config.c FTL-5.25.2.cust/src/config.c
--- FTL-5.25.2/src/config.c 2024-05-08 21:59:50.000000000 +0200
+++ FTL-5.25.2.cust/src/config.c 2024-05-09 13:51:35.638439266 +0200
@@ -76,7 +76,7 @@ void getLogFilePath(void)
}
// Read LOGFILE value if available
- // defaults to: "/var/log/pihole/FTL.log"
+ // defaults to: "/run/log/pihole-ftl/pihole-FTL.log"
buffer = parse_FTLconf(fp, "LOGFILE");
errno = 0;
@@ -84,7 +84,7 @@ void getLogFilePath(void)
if(buffer == NULL || sscanf(buffer, "%127ms", &FTLfiles.log) != 1)
{
// Use standard path if no custom path was obtained from the config file
- FTLfiles.log = strdup("/var/log/pihole/FTL.log");
+ FTLfiles.log = strdup("/run/log/pihole-ftl/pihole-FTL.log");
}
// Test if memory allocation was successful
@@ -336,10 +336,10 @@ void read_FTLconf(void)
logg(" DBIMPORT: Not importing history from database");
// PIDFILE
- getpath(fp, "PIDFILE", "/run/pihole-FTL.pid", &FTLfiles.pid);
+ getpath(fp, "PIDFILE", "/run/pihole-ftl/pihole-FTL.pid", &FTLfiles.pid);
// SOCKETFILE
- getpath(fp, "SOCKETFILE", "/run/pihole/FTL.sock", &FTLfiles.socketfile);
+ getpath(fp, "SOCKETFILE", "/run/pihole-ftl/FTL.sock", &FTLfiles.socketfile);
// SETUPVARSFILE
getpath(fp, "SETUPVARSFILE", "/etc/pihole/setupVars.conf", &FTLfiles.setupVars);
diff -uprN FTL-5.25.2/src/version.h.in FTL-5.25.2.cust/src/version.h.in
--- FTL-5.25.2/src/version.h.in 2024-05-08 21:59:50.000000000 +0200
+++ FTL-5.25.2.cust/src/version.h.in 2024-05-09 13:51:35.625105836 +0200
@@ -1,11 +1,11 @@
#ifndef VERSION_H
#define VERSION_H
-#define GIT_VERSION "@GIT_VERSION@"
-#define GIT_DATE "@GIT_DATE@"
-#define GIT_BRANCH "@GIT_BRANCH@"
-#define GIT_TAG "@GIT_TAG@"
-#define GIT_HASH "@GIT_HASH@"
+#define GIT_VERSION "v5.25.2"
+#define GIT_DATE "2024-05-09"
+#define GIT_BRANCH "master"
+#define GIT_TAG "v5.25.2"
+#define GIT_HASH "builtfromreleasetarball"
#define FTL_ARCH "@FTL_ARCH@"
#define FTL_CC "@FTL_CC@"
diff -uprN FTL-5.25.2/tools/socket_client.c FTL-5.25.2.cust/tools/socket_client.c
--- FTL-5.25.2/tools/socket_client.c 2024-05-08 21:59:50.000000000 +0200
+++ FTL-5.25.2.cust/tools/socket_client.c 2024-05-09 13:51:35.638439266 +0200
@@ -40,7 +40,7 @@ int main (int argc, char **argv) {
address.sun_family = AF_LOCAL;
char *command = ">stats";
- strcpy(address.sun_path,"/run/pihole/FTL.sock");
+ strcpy(address.sun_path,"/run/pihole-ftl/FTL.sock");
int i;
for(i = 1; i < argc; i++) {