From a382dde5e9918c506d5d4264257c4c1ee7a2db5a Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Tue, 23 Sep 2025 17:41:43 +0000 Subject: [PATCH] Support tuxcare.elsXX suffix --- SOURCES/support-tuxcare-els-suffix.patch | 38 ++++++++++++++++++++++++ SPECS/apk-tools.spec | 6 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 SOURCES/support-tuxcare-els-suffix.patch diff --git a/SOURCES/support-tuxcare-els-suffix.patch b/SOURCES/support-tuxcare-els-suffix.patch new file mode 100644 index 0000000..5515ed3 --- /dev/null +++ b/SOURCES/support-tuxcare-els-suffix.patch @@ -0,0 +1,38 @@ +From 9591cf3528595d0f46c131528da39d87a3011963 Mon Sep 17 00:00:00 2001 +From: Koba Karaputadze +Date: Mon, 15 Sep 2025 11:51:56 +0400 +-Subject: [PATCH] support tuxcare.els suffix in versioning + +--- + src/version.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/version.c b/src/version.c +index b12cb7f..763e7bf 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -41,7 +41,11 @@ static void next_token(int *type, apk_blob_t *blob) + } else { + switch (blob->ptr[0]) { + case '.': +- n = TOKEN_DIGIT_OR_ZERO; ++ if (blob->len >= 12 && strncmp(blob->ptr, ".tuxcare.els", 12) == 0) { ++ n = TOKEN_SUFFIX; ++ } else { ++ n = TOKEN_DIGIT_OR_ZERO; ++ } + break; + case '_': + n = TOKEN_SUFFIX; +@@ -71,7 +75,7 @@ static void next_token(int *type, apk_blob_t *blob) + static int64_t get_token(int *type, apk_blob_t *blob) + { + static const char *pre_suffixes[] = { "alpha", "beta", "pre", "rc" }; +- static const char *post_suffixes[] = { "cvs", "svn", "git", "hg", "p" }; ++ static const char *post_suffixes[] = { "cvs", "svn", "git", "hg", "p", "tuxcare.els" }; + int i = 0, nt = TOKEN_INVALID; + int64_t v = 0; + +-- +2.43.0 + diff --git a/SPECS/apk-tools.spec b/SPECS/apk-tools.spec index cd4e2b6..5825ac9 100644 --- a/SPECS/apk-tools.spec +++ b/SPECS/apk-tools.spec @@ -11,7 +11,7 @@ Name: apk-tools Version: 2.14.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fast and lightweight package manager originally for Alpine # libapk AND netbsd-libfetch License: GPL-2.0-only @@ -19,6 +19,7 @@ URL: https://gitlab.alpinelinux.org/alpine/apk-tools Source0: %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.gz Patch0: 0001-Do-not-build-docs.patch +Patch1: support-tuxcare-els-suffix.patch BuildRequires: make BuildRequires: gcc @@ -122,5 +123,8 @@ mkdir -p %{buildroot}%{_localstatedir}/cache/apk %changelog +* Tue Sep 23 2025 Koba Karaputadze - 2.14.10-2 +- Support tuxcare.elsXX suffix + * Thu Mar 14 2024 Neal Gompa - 2.14.1-1 - Initial package