Source: tcl-fitstcl Version: 2.4-4 Severity: important Tags: ftbfs patch upstream
Hi Ole, A new version of cfitsio has been released recently, and it fixes a few security issues, but it also includes a soname change, meaning we have to do a transition. I would like to try to get it into bookworm. So far the version 4.2.0 is already in experimental. I have tried to rebuild all the reverse dependencies and it appears that unfortunately tcl-fitstcl fails to build against it. It is not fully surprising, given it accesses internal cfitsio structures. However NASA just released version 2.5 [1] which adds support for cfitsio 4.2.0 (but removes support for older versions). The debian package also need some changes to make it working, I have attached the debdiff I ended up with. Would it be possible to upload this new version to experimental asap, and if we can still get a transition slot, synchronize the upload to unstable with cfitsio? Thanks, Aurelien [1] https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/ftools/fv/fitsTcl_home.html
diff -Nru tcl-fitstcl-2.4/debian/control tcl-fitstcl-2.5/debian/control --- tcl-fitstcl-2.4/debian/control 2019-02-28 21:06:35.000000000 +0000 +++ tcl-fitstcl-2.5/debian/control 2022-12-16 21:17:19.000000000 +0000 @@ -5,7 +5,7 @@ Uploaders: Ole Streicher <oleb...@debian.org> Build-Depends: debhelper (>= 12), dh-autoreconf, - libcfitsio-dev | libcfitsio3-dev, + libcfitsio-dev (>= 4.2.0), tcl-dev, wcslib-dev Standards-Version: 4.3.0 diff -Nru tcl-fitstcl-2.4/debian/patches/Propagate-CPPFLAGS-and-LDFLAGS-for-hardening.patch tcl-fitstcl-2.5/debian/patches/Propagate-CPPFLAGS-and-LDFLAGS-for-hardening.patch --- tcl-fitstcl-2.4/debian/patches/Propagate-CPPFLAGS-and-LDFLAGS-for-hardening.patch 2019-02-28 21:03:49.000000000 +0000 +++ tcl-fitstcl-2.5/debian/patches/Propagate-CPPFLAGS-and-LDFLAGS-for-hardening.patch 2022-12-16 21:17:19.000000000 +0000 @@ -19,7 +19,7 @@ + ${CC} -c -o ${<D}/${@F} ${CPPFLAGS} ${CFLAGS} ${DEFS} ${IFLAGS} $< # - # $Log: Makefile.in,v $ + # $Log$ diff --git a/configure.in b/configure.in index e5c8d3b..fb969eb 100644 --- a/configure.in diff -Nru tcl-fitstcl-2.4/debian/patches/Remove-the-need-of-a-private-cfitsio-source-copy.patch tcl-fitstcl-2.5/debian/patches/Remove-the-need-of-a-private-cfitsio-source-copy.patch --- tcl-fitstcl-2.4/debian/patches/Remove-the-need-of-a-private-cfitsio-source-copy.patch 2019-02-28 21:03:49.000000000 +0000 +++ tcl-fitstcl-2.5/debian/patches/Remove-the-need-of-a-private-cfitsio-source-copy.patch 2022-12-16 21:17:19.000000000 +0000 @@ -121,7 +121,7 @@ index 0000000..b4dd982 --- /dev/null +++ b/eval_defs.h -@@ -0,0 +1,159 @@ +@@ -0,0 +1,205 @@ +#include <stdio.h> +#include <math.h> +#include <stdlib.h> @@ -134,15 +134,19 @@ +#endif +#include "fitsio2.h" + -+#ifndef FFBISON -+#include "eval_tab.h" -+#endif -+ +#define MAXDIMS 5 +#define MAXSUBS 10 +#define MAXVARNAME 80 +#define CONST_OP -1000 +#define pERROR -1 ++#define MAX_STRLEN 256 ++#define MAX_STRLEN_S "255" ++ ++typedef struct ParseData_struct ParseData; ++typedef void* yyscan_t; ++#ifndef FFBISON ++#include "eval_tab.h" ++#endif + + +typedef struct { @@ -164,7 +168,7 @@ + double dbl; + long lng; + char log; -+ char str[256]; ++ char str[MAX_STRLEN]; + double *dblptr; + long *lngptr; + char *logptr; @@ -175,17 +179,17 @@ + +typedef struct Node { + int operation; -+ void (*DoOp)(struct Node *this); ++ void (*DoOp)(ParseData *, struct Node *this); + int nSubNodes; + int SubNodes[MAXSUBS]; + int type; + lval value; + } Node; + -+typedef struct { ++struct ParseData_struct { + fitsfile *def_fptr; -+ int (*getData)( char *dataName, void *dataValue ); -+ int (*loadData)( int varNum, long fRow, long nRows, ++ int (*getData)( ParseData *, char *dataName, void *dataValue ); ++ int (*loadData)( ParseData *, int varNum, long fRow, long nRows, + void *data, char *undef ); + + int compressed; @@ -201,11 +205,14 @@ + int nNodes; + int nNodesAlloc; + int resultNode; -+ ++ + long firstRow; + long nRows; + + int nCols; ++ long nElements; ++ int nAxis; ++ long nAxes[MAXDIMS]; + iteratorCol *colData; + DataInfo *varData; + PixelFilter *pixFilter; @@ -213,12 +220,13 @@ + long firstDataRow; + long nDataRows; + long totalRows; ++ long nPrevDataRows; + + int datatype; + int hdutype; + + int status; -+ } ParseData; ++}; + +typedef enum { + rnd_fct = 1001, @@ -263,68 +271,196 @@ + nonnull_fct, + angsep_fct, + gasrnd_fct, -+ poirnd_fct ++ poirnd_fct, ++ strmid_fct, ++ strpos_fct, ++ setnull_fct, ++ gtiover_fct, ++ gtifind_fct, ++ elemnum_fct, ++ axiselem_fct, ++ array_fct + } funcOp; + -+extern ParseData gParse; ++ ++typedef struct parseInfo_struct parseInfo; ++ ++struct ParseStatusVariables { /* These variables were 'static' in fits_parse_workfn() */ ++ void *Data, *Null; ++ int datasize; ++ long lastRow, repeat, resDataSize; ++ LONGLONG jnull; ++ parseInfo *userInfo; ++ long zeros[4]; ++}; ++ ++struct parseInfo_struct { ++ int datatype; /* Data type to cast parse results into for user */ ++ void *dataPtr; /* Pointer to array of results, NULL if to use iterCol */ ++ void *nullPtr; /* Pointer to nulval, use zero if NULL */ ++ long maxRows; /* Max No. of rows to process, -1=all, 0=1 iteration */ ++ int anyNull; /* Flag indicating at least 1 undef value encountered */ ++ ParseData *parseData; /* Pointer to parser configuration */ ++ struct ParseStatusVariables parseVariables; ++}; + +#ifdef __cplusplus +extern "C" { +#endif + -+ int ffparse(void); -+ int fflex(void); -+ void ffrestart(FILE*); -+ -+ void Evaluate_Parser( long firstRow, long nRows ); ++/* Not sure why this is needed but it is */ ++#define YYSTYPE FITS_PARSER_YYSTYPE ++/* How ParseData is accessed from the lexer, i.e. by yyextra */ ++#define YY_EXTRA_TYPE ParseData * ++ ++ int fits_parser_yyparse(yyscan_t yyscaner, ParseData *lParse); ++ int fits_parser_yylex(FITS_PARSER_YYSTYPE *, yyscan_t yyscanner); ++ void fits_parser_yyrestart(FILE*, yyscan_t yyscanner); ++ int fits_parser_yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); ++ int fits_parser_yylex_destroy (yyscan_t scanner); ++ ++ void Evaluate_Parser( ParseData *lParse, long firstRow, long nRows ); ++ int fits_parser_allocateCol( ParseData *lParse, int nCol, int *status ); ++ int fits_parser_set_temporary_col(ParseData *lParse, parseInfo *Info, ++ long int nrows, void *nulval, int *status); + +#ifdef __cplusplus + } +#endif + diff --git a/eval_tab.h b/eval_tab.h new file mode 100644 index 0000000..2715f0f --- /dev/null +++ b/eval_tab.h -@@ -0,0 +1,41 @@ -+typedef union { +@@ -0,0 +1,130 @@ ++/* A Bison parser, made by GNU Bison 3.8. */ ++ ++/* Bison interface for Yacc-like parsers in C ++ ++ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, ++ Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see <https://www.gnu.org/licenses/>. */ ++ ++/* As a special exception, you may create a larger work that contains ++ part or all of the Bison parser skeleton and distribute that work ++ under terms of your choice, so long as that work isn't itself a ++ parser generator using the skeleton or a modified version thereof ++ as a parser skeleton. Alternatively, if you modify or redistribute ++ the parser skeleton itself, you may (at your option) remove this ++ special exception, which will cause the skeleton and the resulting ++ Bison output files to be licensed under the GNU General Public ++ License without this special exception. ++ ++ This special exception was added by the Free Software Foundation in ++ version 2.2 of Bison. */ ++ ++/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, ++ especially those whose name start with YY_ or yy_. They are ++ private implementation details that can be changed or removed. */ ++ ++#ifndef YY_FITS_PARSER_YY_EVAL_TAB_H_INCLUDED ++# define YY_FITS_PARSER_YY_EVAL_TAB_H_INCLUDED ++/* Debug traces. */ ++#ifndef FITS_PARSER_YYDEBUG ++# if defined YYDEBUG ++#if YYDEBUG ++# define FITS_PARSER_YYDEBUG 1 ++# else ++# define FITS_PARSER_YYDEBUG 0 ++# endif ++# else /* ! defined YYDEBUG */ ++# define FITS_PARSER_YYDEBUG 0 ++# endif /* ! defined YYDEBUG */ ++#endif /* ! defined FITS_PARSER_YYDEBUG */ ++#if FITS_PARSER_YYDEBUG ++extern int fits_parser_yydebug; ++#endif ++ ++/* Token kinds. */ ++#ifndef FITS_PARSER_YYTOKENTYPE ++# define FITS_PARSER_YYTOKENTYPE ++ enum fits_parser_yytokentype ++ { ++ FITS_PARSER_YYEMPTY = -2, ++ FITS_PARSER_YYEOF = 0, /* "end of file" */ ++ FITS_PARSER_YYerror = 256, /* error */ ++ FITS_PARSER_YYUNDEF = 257, /* "invalid token" */ ++ BOOLEAN = 258, /* BOOLEAN */ ++ LONG = 259, /* LONG */ ++ DOUBLE = 260, /* DOUBLE */ ++ STRING = 261, /* STRING */ ++ BITSTR = 262, /* BITSTR */ ++ FUNCTION = 263, /* FUNCTION */ ++ BFUNCTION = 264, /* BFUNCTION */ ++ IFUNCTION = 265, /* IFUNCTION */ ++ GTIFILTER = 266, /* GTIFILTER */ ++ GTIOVERLAP = 267, /* GTIOVERLAP */ ++ GTIFIND = 268, /* GTIFIND */ ++ REGFILTER = 269, /* REGFILTER */ ++ COLUMN = 270, /* COLUMN */ ++ BCOLUMN = 271, /* BCOLUMN */ ++ SCOLUMN = 272, /* SCOLUMN */ ++ BITCOL = 273, /* BITCOL */ ++ ROWREF = 274, /* ROWREF */ ++ NULLREF = 275, /* NULLREF */ ++ SNULLREF = 276, /* SNULLREF */ ++ OR = 277, /* OR */ ++ AND = 278, /* AND */ ++ EQ = 279, /* EQ */ ++ NE = 280, /* NE */ ++ GT = 281, /* GT */ ++ LT = 282, /* LT */ ++ LTE = 283, /* LTE */ ++ GTE = 284, /* GTE */ ++ XOR = 285, /* XOR */ ++ POWER = 286, /* POWER */ ++ NOT = 287, /* NOT */ ++ INTCAST = 288, /* INTCAST */ ++ FLTCAST = 289, /* FLTCAST */ ++ UMINUS = 290, /* UMINUS */ ++ ACCUM = 291, /* ACCUM */ ++ DIFF = 292 /* DIFF */ ++ }; ++ typedef enum fits_parser_yytokentype fits_parser_yytoken_kind_t; ++#endif ++ ++/* Value type. */ ++#if ! defined FITS_PARSER_YYSTYPE && ! defined FITS_PARSER_YYSTYPE_IS_DECLARED ++union FITS_PARSER_YYSTYPE ++{ ++#line 212 "eval.y" ++ + int Node; /* Index of Node */ + double dbl; /* real value */ + long lng; /* integer value */ + char log; /* logical value */ -+ char str[256]; /* string value */ -+} FFSTYPE; -+#define BOOLEAN 258 -+#define LONG 259 -+#define DOUBLE 260 -+#define STRING 261 -+#define BITSTR 262 -+#define FUNCTION 263 -+#define BFUNCTION 264 -+#define GTIFILTER 265 -+#define REGFILTER 266 -+#define COLUMN 267 -+#define BCOLUMN 268 -+#define SCOLUMN 269 -+#define BITCOL 270 -+#define ROWREF 271 -+#define NULLREF 272 -+#define SNULLREF 273 -+#define OR 274 -+#define AND 275 -+#define EQ 276 -+#define NE 277 -+#define GT 278 -+#define LT 279 -+#define LTE 280 -+#define GTE 281 -+#define POWER 282 -+#define NOT 283 -+#define INTCAST 284 -+#define FLTCAST 285 -+#define UMINUS 286 -+#define ACCUM 287 -+#define DIFF 288 ++ char str[MAX_STRLEN]; /* string value */ ++ ++#line 117 "eval_tab.h" ++ ++}; ++typedef union FITS_PARSER_YYSTYPE FITS_PARSER_YYSTYPE; ++# define FITS_PARSER_YYSTYPE_IS_TRIVIAL 1 ++# define FITS_PARSER_YYSTYPE_IS_DECLARED 1 ++#endif ++ ++ ++ ++ ++int fits_parser_yyparse (yyscan_t scanner, ParseData *lParse); + + -+extern FFSTYPE fflval; ++#endif /* !YY_FITS_PARSER_YY_EVAL_TAB_H_INCLUDED */