From 69f5605e5a31eea004f81cec394c4ed97657dc87 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 16 Nov 2024 21:16:20 +0200 Subject: [PATCH] pagekitec: Make version apk compatible Make PKG_VERSION compatible with apk by dropping the C char, simplifying Makefile also otherwise. Also remove unnecessary variables. Refresh patches (just cosmetics for CI). Signed-off-by: Hannu Nyman --- net/pagekitec/Makefile | 9 +++------ ...to-work-ok-with-64-bit-time_t-time64.patch | 19 +++++-------------- ...s-files-correctly-support-64bit-time.patch | 11 +++-------- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/net/pagekitec/Makefile b/net/pagekitec/Makefile index 3da1782ef9..7af59829af 100644 --- a/net/pagekitec/Makefile +++ b/net/pagekitec/Makefile @@ -8,16 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pagekitec -PKG_REV:=0.91.201110 -PKG_VERSION:=$(PKG_REV)C +PKG_VERSION:=0.91.201110 PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=101f5a913f0bbb0c06b0799a5020988a7eeb108a4fcd1a45697538cf51caee2e +PKG_MIRROR_HASH:=fc78791a76b02e1b82708af41b093cf9669924a5c83d8bf2a3e96e2f2ea8775b PKG_SOURCE_URL:=https://github.com/pagekite/libpagekite.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v$(PKG_REV) +PKG_SOURCE_VERSION:=v$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk diff --git a/net/pagekitec/patches/0001-Fix-to-work-ok-with-64-bit-time_t-time64.patch b/net/pagekitec/patches/0001-Fix-to-work-ok-with-64-bit-time_t-time64.patch index a19b93c02f..be592b0036 100644 --- a/net/pagekitec/patches/0001-Fix-to-work-ok-with-64-bit-time_t-time64.patch +++ b/net/pagekitec/patches/0001-Fix-to-work-ok-with-64-bit-time_t-time64.patch @@ -17,11 +17,9 @@ performance penalty in that case). libpagekite/pkproto.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) -diff --git a/libpagekite/pklogging.c b/libpagekite/pklogging.c -index 6129c30..1b1835c 100644 --- a/libpagekite/pklogging.c +++ b/libpagekite/pklogging.c -@@ -208,9 +208,9 @@ void pk_dump_conn(char* prefix, struct pk_conn* conn) +@@ -208,9 +208,9 @@ void pk_dump_conn(char* prefix, struct p if (conn->sockfd < 0) return; pk_log(PK_LOG_MANAGER_DEBUG, "%s/sockfd: %d", prefix, conn->sockfd); @@ -34,7 +32,7 @@ index 6129c30..1b1835c 100644 pk_log(PK_LOG_MANAGER_DEBUG, "%s/read_bytes: %d", prefix, conn->read_bytes); pk_log(PK_LOG_MANAGER_DEBUG, "%s/read_kb: %d", prefix, conn->read_kb); pk_log(PK_LOG_MANAGER_DEBUG, "%s/sent_kb: %d", prefix, conn->sent_kb); -@@ -281,8 +281,8 @@ void pk_dump_state(struct pk_manager* pkm) +@@ -281,8 +281,8 @@ void pk_dump_state(struct pk_manager* pk pk_log(LL, "pk_manager/kite_max: %d", pkm->kite_max); pk_log(LL, "pk_manager/tunnel_max: %d", pkm->tunnel_max); pk_log(LL, "pk_manager/be_conn_max: %d", pkm->be_conn_max); @@ -45,11 +43,9 @@ index 6129c30..1b1835c 100644 pk_log(LL, "pk_manager/enable_timer: %d", 0 < pkm->enable_timer); pk_log(LL, "pk_manager/fancy_pagekite_net_rejection_url: %s", pkm->fancy_pagekite_net_rejection_url); pk_log(LL, "pk_manager/want_spare_frontends: %d", pkm->want_spare_frontends); -diff --git a/libpagekite/pkmanager.c b/libpagekite/pkmanager.c -index 2e526c5..007f078 100644 --- a/libpagekite/pkmanager.c +++ b/libpagekite/pkmanager.c -@@ -1070,8 +1070,8 @@ static void pkm_tick_cb(EV_P_ ev_async* w, int revents) +@@ -1070,8 +1070,8 @@ static void pkm_tick_cb(EV_P_ ev_async* pkm->timer.repeat = pkm->next_tick; ev_timer_again(pkm->loop, &(pkm->timer)); pk_log(PK_LOG_MANAGER_INFO, @@ -60,7 +56,7 @@ index 2e526c5..007f078 100644 pkm->status, pk_state.live_tunnels, PK_VERSION); /* We slow down exponentially by default... */ -@@ -1122,8 +1122,8 @@ static void pkm_tick_cb(EV_P_ ev_async* w, int revents) +@@ -1122,8 +1122,8 @@ static void pkm_tick_cb(EV_P_ ev_async* fe->last_ping = now; pkc_write(&(fe->conn), ping, pingsize); pk_log(PK_LOG_TUNNEL_DATA, @@ -71,8 +67,6 @@ index 2e526c5..007f078 100644 next_tick = 1 + pkm->housekeeping_interval_min; } } -diff --git a/libpagekite/pkproto.c b/libpagekite/pkproto.c -index fda41d2..02a47c7 100644 --- a/libpagekite/pkproto.c +++ b/libpagekite/pkproto.c @@ -577,7 +577,7 @@ int pk_make_salt(char* salt) { @@ -84,7 +78,7 @@ index fda41d2..02a47c7 100644 PK_TRACE_FUNCTION; -@@ -606,7 +606,7 @@ char* pk_sign(const char* token, const char* secret, time_t ts, +@@ -606,7 +606,7 @@ char* pk_sign(const char* token, const c /* Optionally embed a timestamp to the resolution of 10 minutes */ if (ts > 0) { @@ -93,6 +87,3 @@ index fda41d2..02a47c7 100644 buffer[0] = 't'; } else tsbuf[0] = '\0'; --- -2.37.3 - diff --git a/net/pagekitec/patches/0002-pagekitec-status-files-correctly-support-64bit-time.patch b/net/pagekitec/patches/0002-pagekitec-status-files-correctly-support-64bit-time.patch index 8abcb667d8..521be9110d 100644 --- a/net/pagekitec/patches/0002-pagekitec-status-files-correctly-support-64bit-time.patch +++ b/net/pagekitec/patches/0002-pagekitec-status-files-correctly-support-64bit-time.patch @@ -14,11 +14,9 @@ Signed-off-by: Karl Palsson contrib/backends/pagekitec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/contrib/backends/pagekitec.c b/contrib/backends/pagekitec.c -index ce39e30..76a78ac 100644 --- a/contrib/backends/pagekitec.c +++ b/contrib/backends/pagekitec.c -@@ -54,7 +54,7 @@ Note: For alternate license terms, see the file COPYING.md. +@@ -54,7 +54,7 @@ Note: For alternate license terms, see t " \"pagekitec_status_code\": %d,\n" \ " \"pagekitec_pid\": %d,\n" \ " \"pagekitec_update_min_interval\": %d,\n" \ @@ -27,7 +25,7 @@ index ce39e30..76a78ac 100644 "}\n") /* Enable this format using -Y text:/path/to/file/ */ -@@ -64,7 +64,7 @@ Note: For alternate license terms, see the file COPYING.md. +@@ -64,7 +64,7 @@ Note: For alternate license terms, see t "pagekitec_status_code: %d\n" \ "pagekitec_pid: %d\n" \ "pagekitec_update_min_interval: %d\n" \ @@ -36,7 +34,7 @@ index ce39e30..76a78ac 100644 pagekite_mgr m; -@@ -153,7 +153,7 @@ int summarize_status(const char* fpath, const char* format, const char *status_m +@@ -153,7 +153,7 @@ int summarize_status(const char* fpath, } fprintf(fd, format, @@ -45,6 +43,3 @@ index ce39e30..76a78ac 100644 if (0 == ftruncate(fileno(fd), ftell(fd))) fflush(fd); fclose(fd); --- -2.37.3 - -- 2.30.2