Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bcal for openSUSE:Factory checked in at 2025-04-20 09:35:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bcal (Old) and /work/SRC/openSUSE:Factory/.bcal.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bcal" Sun Apr 20 09:35:04 2025 rev:6 rq:1270828 version:2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/bcal/bcal.changes 2022-04-19 09:59:51.575688683 +0200 +++ /work/SRC/openSUSE:Factory/.bcal.new.30101/bcal.changes 2025-04-20 19:50:15.904620274 +0200 @@ -1,0 +2,8 @@ +Tue Apr 15 11:59:06 UTC 2025 - pgaj...@suse.com + +- added patches + https://github.com/jarun/bcal/commit/b9de4fa9c0e29c2a4d55ddde007111c029364f6c + https://github.com/jarun/bcal/commit/ea290b19c0ba0c7a8e34c640eac1260dc0b7269a + + bcal-gcc15.patch + +------------------------------------------------------------------- New: ---- bcal-gcc15.patch BETA DEBUG BEGIN: New: https://github.com/jarun/bcal/commit/ea290b19c0ba0c7a8e34c640eac1260dc0b7269a + bcal-gcc15.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bcal.spec ++++++ --- /var/tmp/diff_new_pack.CjLIxf/_old 2025-04-20 19:50:16.332638087 +0200 +++ /var/tmp/diff_new_pack.CjLIxf/_new 2025-04-20 19:50:16.332638087 +0200 @@ -1,7 +1,7 @@ # # spec file for package bcal # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2018 Dilawar Singh <dilawar.s.raj...@gmail.com> # # All modifications and additions to the file contributed by third parties @@ -25,6 +25,8 @@ Version: 2.4 Release: 0 Source0: https://github.com/jarun/bcal/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# https://github.com/jarun/bcal/commit/b9de4fa9c0e29c2a4d55ddde007111c029364f6c +Patch0: bcal-gcc15.patch BuildRequires: readline-devel ExcludeArch: %ix86 %arm %ppc @@ -36,7 +38,7 @@ the value when the 43rd bit of a 64-bit address is set, bcal is for you. %prep -%setup -q +%autosetup -p1 %build export CFLAGS="%{optflags}" ++++++ bcal-gcc15.patch ++++++ Index: bcal-2.4/src/bcal.c =================================================================== --- bcal-2.4.orig/src/bcal.c +++ bcal-2.4/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 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 ba { 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 /* 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 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_ /* 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_ 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_ 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, queu 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, queu 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, queu 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); diff --git a/src/bcal.c b/src/bcal.c index 57dfb1e..7b3de31 100644 --- a/src/bcal.c +++ b/src/bcal.c @@ -27,6 +27,7 @@ #include <sys/types.h> #include <sys/wait.h> #include <signal.h> +#include <getopt.h> #include <readline/history.h> #include <readline/readline.h> #include "dslib.h"