Control: tags 1079955 + patch Control: tags 1079955 + pending Control: tags 1096360 + patch Control: tags 1096360 + pending
Dear maintainer, I've prepared an NMU for bcal (versioned as 2.4-2.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for bcal-2.4 bcal-2.4 changelog | 10 + control | 6 patches/0001-Add-fix-to-use-with-GCC-15.patch | 228 ++++++++++++++++++++++++++ patches/series | 1 4 files changed, 243 insertions(+), 2 deletions(-) diff -Nru bcal-2.4/debian/changelog bcal-2.4/debian/changelog --- bcal-2.4/debian/changelog 2022-12-17 09:21:14.000000000 +0200 +++ bcal-2.4/debian/changelog 2025-09-19 23:23:41.000000000 +0300 @@ -1,3 +1,13 @@ +bcal (2.4-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Backport upstream fix for FTBFS with GCC 15. (Closes: #1096360) + * Build depend on architecture-is-little-endian and + architecture-is-64-bit instead of hardcoding an architecture + list. (Closes: #1079955) + + -- Adrian Bunk <[email protected]> Fri, 19 Sep 2025 23:23:41 +0300 + bcal (2.4-2) unstable; urgency=medium * Fix d/watch issue diff -Nru bcal-2.4/debian/control bcal-2.4/debian/control --- bcal-2.4/debian/control 2021-10-17 09:06:17.000000000 +0300 +++ bcal-2.4/debian/control 2025-09-19 23:23:41.000000000 +0300 @@ -2,7 +2,9 @@ Section: misc Priority: optional Maintainer: SZ Lin (林上智) <[email protected]> -Build-Depends: debhelper-compat (= 13), +Build-Depends: architecture-is-64-bit, + architecture-is-little-endian, + debhelper-compat (= 13), libc6-dev (>= 2.24), libreadline-dev, python3 @@ -13,7 +15,7 @@ Vcs-Browser: https://salsa.debian.org/debian/bcal Package: bcal -Architecture: amd64 arm64 ppc64 ppc64el riscv64 mips64el +Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, readline-common diff -Nru bcal-2.4/debian/patches/0001-Add-fix-to-use-with-GCC-15.patch bcal-2.4/debian/patches/0001-Add-fix-to-use-with-GCC-15.patch --- bcal-2.4/debian/patches/0001-Add-fix-to-use-with-GCC-15.patch 1970-01-01 02:00:00.000000000 +0200 +++ bcal-2.4/debian/patches/0001-Add-fix-to-use-with-GCC-15.patch 2025-09-19 23:23:41.000000000 +0300 @@ -0,0 +1,228 @@ +From 936213c00ec1d8ac086b6a722a4144413bf9c838 Mon Sep 17 00:00:00 2001 +From: Robert-André Mauchin <[email protected]> +Date: Sat, 25 Jan 2025 16:36:43 +0100 +Subject: Add fix to use with GCC 15 + +C23 added various new keywords, including bool, true, false, nullptr, and thread_local. Code that uses these for identifiers +need changing. + +In C99 and later we can use #include <stdbool.h> which provides definitions of bool, true, and false compatible with C23. + +https://gcc.gnu.org/gcc-15/porting_to.html +--- + src/bcal.c | 55 ++++++++++++++++++++++++++---------------------------- + 1 file changed, 26 insertions(+), 29 deletions(-) + +diff --git a/src/bcal.c b/src/bcal.c +index fd75a7c..ec11139 100644 +--- a/src/bcal.c ++++ b/src/bcal.c +@@ -20,6 +20,7 @@ + + #include <ctype.h> + #include <errno.h> ++#include <stdbool.h> + #include <stdio.h> + #include <string.h> + #include <unistd.h> +@@ -31,9 +32,6 @@ + #include "dslib.h" + #include "log.h" + +-#define TRUE 1 +-#define FALSE !TRUE +- + #define SECTOR_SIZE 512 /* 0x200 */ + #define MAX_HEAD 16 /* 0x10 */ + #define MAX_SECTOR 63 /* 0x3f */ +@@ -44,7 +42,6 @@ + #define MAX_BITS 128 + #define ALIGNMENT_MASK_4BIT 0xF + +-typedef unsigned char bool; + typedef unsigned char uchar; + typedef unsigned int uint; + typedef unsigned long ulong; +@@ -172,8 +169,8 @@ static size_t bstrlcpy(char *dest, const char *src, size_t n) + static bool program_exit(const char *str) + { + if (!strcmp(str, "exit") || !strcmp(str, "quit")) +- return TRUE; +- return FALSE; ++ return true; ++ return false; + } + + /* +@@ -439,31 +436,31 @@ static bool ischarvalid(char ch, uint base, uint *val) + { + if (ch == '0' || ch == '1') { + *val = ch - '0'; +- return TRUE; ++ return true; + } + } else if (base == 16) { + if (ch >= '0' && ch <= '9') { + *val = ch - '0'; +- return TRUE; ++ return true; + } + + if (ch >= 'a' && ch <= 'f') { + *val = (ch - 'a') + 10; +- return TRUE; ++ return true; + } + + if (ch >= 'A' && ch <= 'F') { + *val = (ch - 'A') + 10; +- return TRUE; ++ return true; + } + } else if (base == 10) { + if (ch >= '0' && ch <= '9') { + *val = ch - '0'; +- return TRUE; ++ return true; + } + } + +- return FALSE; ++ return false; + } + + /* +@@ -1027,32 +1024,32 @@ static bool chs2lba(char *chs, maxuint_t *lba) + /* Fail if CHS is omitted */ + if (token_no < 3) { + log(ERROR, "CHS missing\n"); +- return FALSE; ++ return false; + } + + if (!param[3]) { + log(ERROR, "MAX_HEAD = 0\n"); +- return FALSE; ++ return false; + } + + if (!param[4]) { + log(ERROR, "MAX_SECTOR = 0\n"); +- return FALSE; ++ return false; + } + + if (!param[2]) { + log(ERROR, "S = 0\n"); +- return FALSE; ++ return false; + } + + if (param[1] > param[3]) { + log(ERROR, "H > MAX_HEAD\n"); +- return FALSE; ++ return false; + } + + if (param[2] > param[4]) { + log(ERROR, "S > MAX_SECTOR\n"); +- return FALSE; ++ return false; + } + + *lba = (maxuint_t)param[3] * param[4] * param[0]; /* MH * MS * C */ +@@ -1064,7 +1061,7 @@ static bool chs2lba(char *chs, maxuint_t *lba) + printf(" C:%lu H:%lu S:%lu MAX_HEAD:%lu MAX_SECTOR:%lu\n", + param[0], param[1], param[2], param[3], param[4]); + +- return TRUE; ++ return true; + } + + static bool lba2chs(char *lba, t_chs *p_chs) +@@ -1103,17 +1100,17 @@ static bool lba2chs(char *lba, t_chs *p_chs) + /* Fail if LBA is omitted */ + if (!token_no) { + log(ERROR, "LBA missing\n"); +- return FALSE; ++ return false; + } + + if (!param[1]) { + log(ERROR, "MAX_HEAD = 0\n"); +- return FALSE; ++ return false; + } + + if (!param[2]) { + log(ERROR, "MAX_SECTOR = 0\n"); +- return FALSE; ++ return false; + } + + /* L / (MS * MH) */ +@@ -1122,14 +1119,14 @@ static bool lba2chs(char *lba, t_chs *p_chs) + p_chs->h = (ulong)((param[0] / param[2]) % param[1]); + if (p_chs->h > MAX_HEAD) { + log(ERROR, "H > MAX_HEAD\n"); +- return FALSE; ++ return false; + } + + /* (L % MS) + 1 */ + p_chs->s = (ulong)((param[0] % param[2]) + 1); + if (p_chs->s > MAX_SECTOR) { + log(ERROR, "S > MAX_SECTOR\n"); +- return FALSE; ++ return false; + } + + printf("\033[1mLBA2CHS\033[0m\n LBA:%s ", +@@ -1137,7 +1134,7 @@ static bool lba2chs(char *lba, t_chs *p_chs) + printf("MAX_HEAD:%s ", getstr_u128(param[1], uint_buf)); + printf("MAX_SECTOR:%s\n", getstr_u128(param[2], uint_buf)); + +- return TRUE; ++ return true; + } + + static void show_basic_sizes() +@@ -1318,7 +1315,7 @@ static int infix2postfix(char *exp, queue **resf, queue **resr) + char *token = strtok(exp, " "); + static Data tokenData, ct; + int balanced = 0; +- bool tokenize = TRUE; ++ bool tokenize = true; + + tokenData.p[0] = '\0'; + tokenData.unit = 0; +@@ -1391,7 +1388,7 @@ static int infix2postfix(char *exp, queue **resf, queue **resr) + tokenData.unit = 1; + log(DEBUG, "unit found\n"); + } else +- tokenize = FALSE; /* We already toknized here */ ++ tokenize = false; /* We already toknized here */ + + /* Enqueue operands */ + log(DEBUG, "tokenData: %s %d\n", tokenData.p, tokenData.unit); +@@ -1403,7 +1400,7 @@ static int infix2postfix(char *exp, queue **resf, queue **resr) + if (tokenize) + token = strtok(NULL, " "); + else +- tokenize = TRUE; ++ tokenize = true; + + log(DEBUG, "token: %s\n", token); + } +@@ -2062,7 +2059,7 @@ int main(int argc, char **argv) + ulong sectorsz = SECTOR_SIZE; + + if (getenv("BCAL_USE_CALC")) +- cfg.calc = TRUE; ++ cfg.calc = true; + + opterr = 0; + rl_bind_key('\t', rl_insert); +-- +2.30.2 + diff -Nru bcal-2.4/debian/patches/series bcal-2.4/debian/patches/series --- bcal-2.4/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ bcal-2.4/debian/patches/series 2025-09-19 23:23:41.000000000 +0300 @@ -0,0 +1 @@ +0001-Add-fix-to-use-with-GCC-15.patch

