diff --git a/libsmi-0.4.8-symbols-clash.patch b/libsmi-0.4.8-symbols-clash.patch index 12f874c..072c55a 100644 --- a/libsmi-0.4.8-symbols-clash.patch +++ b/libsmi-0.4.8-symbols-clash.patch @@ -1,6 +1,6 @@ -diff -up libsmi-0.4.8/lib/data.c.clash libsmi-0.4.8/lib/data.c ---- libsmi-0.4.8/lib/data.c.clash 2012-10-24 18:07:24.251036502 +0200 -+++ libsmi-0.4.8/lib/data.c 2012-10-24 18:14:14.709159698 +0200 +diff -up libsmi-0.4.8/lib/smi-data.c.clash libsmi-0.4.8/lib/smi-data.c +--- libsmi-0.4.8/lib/smi-data.c.clash 2012-10-24 18:07:24.251036502 +0200 ++++ libsmi-0.4.8/lib/smi-data.c 2012-10-24 18:14:14.709159698 +0200 @@ -79,6 +79,7 @@ static Handle *lastHandlePtr = NULL; *---------------------------------------------------------------------- */ diff --git a/libsmi-c5830721-cleanups.patch b/libsmi-c5830721-cleanups.patch new file mode 100644 index 0000000..06a99d8 --- /dev/null +++ b/libsmi-c5830721-cleanups.patch @@ -0,0 +1,105 @@ +diff -up libsmi-c5830721/lib/parser-sming.y.cleanups libsmi-c5830721/lib/parser-sming.y +--- libsmi-c5830721/lib/parser-sming.y.cleanups 2024-01-05 10:18:45.522863586 -0500 ++++ libsmi-c5830721/lib/parser-sming.y 2024-01-05 10:26:01.760964005 -0500 +@@ -86,7 +86,8 @@ static int bitsFlag = 0; + * and typedef to tie the type statement respectively to class or + * module. + */ +-static int attributeFlag = 0; ++/* UNUSED? */ ++/* static int attributeFlag = 0; */ + + #define SMI_EPOCH 631152000 /* 01 Jan 1990 00:00:00 */ + +@@ -179,7 +180,7 @@ checkTypes(Parser *parserPtr, Module *mo + * Complain about empty description clauses. + */ + +- if (! parserPtr->flags & SMI_FLAG_NODESCR ++ if (!(parserPtr->flags & SMI_FLAG_NODESCR) + && (! typePtr->export.description + || ! typePtr->export.description[0])) { + smiPrintErrorAtLine(parserPtr, ERR_EMPTY_DESCRIPTION, +@@ -876,8 +877,8 @@ typedefStatement: typedefKeyword sep ucI + /* + *check for duplicate names in the module + */ +- if(typePtr = +- findType(typeIdentifier, thisParserPtr,thisModulePtr)) ++ if((typePtr = ++ findType(typeIdentifier, thisParserPtr,thisModulePtr))) + if( typePtr->modulePtr == thisParserPtr->modulePtr) + smiPrintError(thisParserPtr, + ERR_DUPLICATE_TYPE_NAME, +@@ -910,8 +911,8 @@ typedefStatement: typedefKeyword sep ucI + if (typePtr->export.basetype == SMI_BASETYPE_ENUM) { + /* check ENUM value for correctness */ + if ($11->len) { +- if (namedNumberPtr = findNamedNumberByName(typePtr, +- $11->value.ptr)) { ++ if ((namedNumberPtr = findNamedNumberByName(typePtr, ++ $11->value.ptr))) { + smiFree($11); + $11 = &namedNumberPtr->export.value; + } else { +@@ -1056,11 +1057,11 @@ classStatement: classKeyword sep ucIdent + classPtr->uniqueList->nextPtr = NULL; + smiFree($11); + } else { +- tmpList = $11; ++ /* tmpList = $11; */ + /* convert all attribute names to attributes */ +- for (tmpList; tmpList; tmpList=tmpList->nextPtr) { +- if (tmpAttribute = +- (Attribute*)smiGetAttribute(&(classPtr->export),(char*)(tmpList->ptr))) ++ for (tmpList = $11; tmpList; tmpList=tmpList->nextPtr) { ++ if ((tmpAttribute = ++ (Attribute*)smiGetAttribute(&(classPtr->export),(char*)(tmpList->ptr)))) + { + smiFree(tmpList->ptr); + tmpList->ptr = tmpAttribute; +diff -up libsmi-c5830721/tools/dump-cm.c.cleanups libsmi-c5830721/tools/dump-cm.c +--- libsmi-c5830721/tools/dump-cm.c.cleanups 2024-01-05 10:12:26.501563299 -0500 ++++ libsmi-c5830721/tools/dump-cm.c 2024-01-05 10:12:54.195950583 -0500 +@@ -48,7 +48,7 @@ static const float HEADSPACESIZETABLE = + static const float ATTRFONTSIZE = (float)0.48; + static const float ATTRSPACESIZE = (float)2.4; + static const float RECTCORRECTION = (float)0.85; +-static const float EDGEYSPACING = (float)2.0; ++/* static const float EDGEYSPACING = (float)2.0; */ + static const float TABLEHEIGHT = (float)2.6; /* headline of the table */ + static const float TABLEELEMHEIGHT = (float)0.675; /* height of one attribute */ + +diff -up libsmi-c5830721/tools/dump-identifiers.c.cleanups libsmi-c5830721/tools/dump-identifiers.c +--- libsmi-c5830721/tools/dump-identifiers.c.cleanups 2024-01-05 10:09:51.788399769 -0500 ++++ libsmi-c5830721/tools/dump-identifiers.c 2024-01-05 10:10:19.927793271 -0500 +@@ -148,7 +148,7 @@ static void fprintYangAll(FILE *f, const + fprintf(f, ":%d:", 0); + } + fprintf(f, " %*s %s\n", -identifierLen, childNode->value, +- yangDeclAsString(childNode->nodeKind), childNode); ++ yangDeclAsString(childNode->nodeKind)); + } + } + break; +@@ -161,7 +161,7 @@ static void fprintYangAll(FILE *f, const + + static void fprintYangIdentifiers(FILE *f, int modc, SmiModule **modv) + { +- YangNode *typeNode; ++ /* YangNode *typeNode; */ + int i; + + for (i = 0; i < modc; i++) { +diff -up libsmi-c5830721/tools/dump-tree.c.cleanups libsmi-c5830721/tools/dump-tree.c +--- libsmi-c5830721/tools/dump-tree.c.cleanups 2024-01-05 10:10:33.185978677 -0500 ++++ libsmi-c5830721/tools/dump-tree.c 2024-01-05 10:12:07.117292227 -0500 +@@ -373,7 +373,7 @@ static void fprintSubTree(FILE *f, SmiNo + char *prefix, size_t typefieldlen) + { + SmiNode *childNode, *indexNode; +- SmiType *type; ++ /* SmiType *type; */ + int i = 0, cnt, prefixlen; + size_t newtypefieldlen = 9; + char c = 0; diff --git a/libsmi-c5830721-configure-c99.patch b/libsmi-c5830721-configure-c99.patch new file mode 100644 index 0000000..6a4f701 --- /dev/null +++ b/libsmi-c5830721-configure-c99.patch @@ -0,0 +1,47 @@ +diff -up libsmi-c5830721/configure.ac.c99 libsmi-c5830721/configure.ac +--- libsmi-c5830721/configure.ac.c99 2024-01-05 09:24:57.348720326 -0500 ++++ libsmi-c5830721/configure.ac 2024-01-05 09:26:13.074779292 -0500 +@@ -42,8 +42,8 @@ AC_ARG_WITH(cc, + CC="$withval") + + AC_MSG_CHECKING([for additional required compiler flags]) +-AC_TRY_RUN([#include +- main() { ++AC_TRY_RUN([#include ++ int main(void) { + #ifdef __SUNPRO_C + exit(0); + #else +@@ -104,8 +104,8 @@ dirseparator="$withval", dirseparator="" + + AC_MSG_CHECKING([for path separator character]) + if test "$pathseparator" = "" ; then +- AC_TRY_RUN([#include +- main() { ++ AC_TRY_RUN([#include ++ int main(void) { + #ifdef _WIN32 + exit(0); + #else +@@ -118,8 +118,8 @@ echo $pathseparator + + AC_MSG_CHECKING([for dir separator character]) + if test "$dirseparator" = "" ; then +- AC_TRY_RUN([#include +- main() { ++ AC_TRY_RUN([#include ++ int main(void) { + #ifdef _WIN32 + exit(0); + #else +@@ -144,8 +144,8 @@ AC_MSG_CHECKING([for 64 bit types]) + # "warning: decimal constant is so large that it is unsigned" + # if used with the (correct) value -9223372036854775808LL. + # +-AC_TRY_RUN([#include +- main() { ++AC_TRY_RUN([#include ++ int main(void) { + long long ll; + unsigned long long ull; + exit(0); diff --git a/libsmi-c5830721-fix-missing-declaration.patch b/libsmi-c5830721-fix-missing-declaration.patch new file mode 100644 index 0000000..445b97f --- /dev/null +++ b/libsmi-c5830721-fix-missing-declaration.patch @@ -0,0 +1,12 @@ +diff -up libsmi-c5830721/lib/yang-data.h.fix-missing-declaration libsmi-c5830721/lib/yang-data.h +--- libsmi-c5830721/lib/yang-data.h.fix-missing-declaration 2024-01-05 09:33:06.136555606 -0500 ++++ libsmi-c5830721/lib/yang-data.h 2024-01-05 09:33:24.150807519 -0500 +@@ -164,6 +164,8 @@ int removeYangNode(_YangNode* target, _Y + + _YangModuleInfo *createModuleInfo(_YangNode *modulePtr); + ++void createIdentifierRef(_YangNode *node, char* prefix, char* ident); ++ + void createTypeInfo(_YangNode *node); + + _YangNode *findYangModuleByName(const char *modulename, char* revision); diff --git a/libsmi-c5830721-include-fix.patch b/libsmi-c5830721-include-fix.patch new file mode 100644 index 0000000..b4ba374 --- /dev/null +++ b/libsmi-c5830721-include-fix.patch @@ -0,0 +1,22 @@ +diff -up libsmi-c5830721/lib/error.h.include-fix libsmi-c5830721/lib/error.h +--- libsmi-c5830721/lib/error.h.include-fix 2021-01-15 06:10:12.000000000 -0500 ++++ libsmi-c5830721/lib/error.h 2024-01-05 09:58:04.954515295 -0500 +@@ -14,6 +14,7 @@ + #ifndef _ERROR_H + #define _ERROR_H + ++#include "smi-check.h" + #include "smi-data.h" + #include "errormacros.h" /* list of error macros generated from error.c */ + +diff -up libsmi-c5830721/lib/parser-yang.y.include-fix libsmi-c5830721/lib/parser-yang.y +--- libsmi-c5830721/lib/parser-yang.y.include-fix 2024-01-05 09:59:45.714924347 -0500 ++++ libsmi-c5830721/lib/parser-yang.y 2024-01-05 10:00:01.192140785 -0500 +@@ -37,6 +37,7 @@ + #include "yang-data.h" + #include "parser-yang.h" + #include "scanner-yang.h" ++#include "yang-check.h" + #include "yang-complex-types.h" + #include "util.h" + #include "error.h" diff --git a/libsmi-c5830721-missing-semicolon.patch b/libsmi-c5830721-missing-semicolon.patch new file mode 100644 index 0000000..12f14d3 --- /dev/null +++ b/libsmi-c5830721-missing-semicolon.patch @@ -0,0 +1,12 @@ +diff -up libsmi-c5830721/lib/parser-sming.y.missing-semicolon libsmi-c5830721/lib/parser-sming.y +--- libsmi-c5830721/lib/parser-sming.y.missing-semicolon 2024-01-05 10:02:02.926843140 -0500 ++++ libsmi-c5830721/lib/parser-sming.y 2024-01-05 10:02:08.738924418 -0500 +@@ -1550,7 +1550,7 @@ identityStatement: identityKeyword sep l + referenceStatement_stmtsep_01 + { + setIdentityReference(identityPtr, $14, +- thisParserPtr) ++ thisParserPtr); + } + '}' optsep ';' + { diff --git a/libsmi-c5830721-switch-fixes.patch b/libsmi-c5830721-switch-fixes.patch new file mode 100644 index 0000000..c9005ef --- /dev/null +++ b/libsmi-c5830721-switch-fixes.patch @@ -0,0 +1,37 @@ +diff -up libsmi-c5830721/lib/smi-check.c.switch-fixes libsmi-c5830721/lib/smi-check.c +--- libsmi-c5830721/lib/smi-check.c.switch-fixes 2021-01-15 06:10:12.000000000 -0500 ++++ libsmi-c5830721/lib/smi-check.c 2024-01-05 09:54:57.791897987 -0500 +@@ -884,6 +884,7 @@ smiCheckIndex(Parser *parser, Object *ob + case SMI_BASETYPE_FLOAT32: + case SMI_BASETYPE_FLOAT64: + case SMI_BASETYPE_FLOAT128: ++ case SMI_BASETYPE_POINTER: + case SMI_BASETYPE_UNKNOWN: + smiPrintErrorAtLine(parser, ERR_INDEX_BASETYPE, object->line, + typePtr->export.name ? typePtr->export.name +diff -up libsmi-c5830721/lib/yang-check.c.switch-fixes libsmi-c5830721/lib/yang-check.c +--- libsmi-c5830721/lib/yang-check.c.switch-fixes 2021-01-15 06:10:12.000000000 -0500 ++++ libsmi-c5830721/lib/yang-check.c 2024-01-05 09:56:01.209784830 -0500 +@@ -1103,6 +1103,22 @@ static void typeHandler(_YangNode* nodeP + smiPrintErrorAtLine(currentParser, ERR_CHILD_REQUIRED, nodePtr->line, "decimal64", "fraction-digits"); + } + break; ++ case YANG_TYPE_BINARY: ++ case YANG_TYPE_BOOLEAN: ++ case YANG_TYPE_EMPTY: ++ case YANG_TYPE_INSTANCE_IDENTIFIER: ++ case YANG_TYPE_INT8: ++ case YANG_TYPE_INT16: ++ case YANG_TYPE_INT32: ++ case YANG_TYPE_INT64: ++ case YANG_TYPE_NONE: ++ case YANG_TYPE_STRING: ++ case YANG_TYPE_UINT8: ++ case YANG_TYPE_UINT16: ++ case YANG_TYPE_UINT32: ++ case YANG_TYPE_UINT64: ++ /* Should we do anything with these types? */ ++ break; + } + } + diff --git a/libsmi-c5830721-symbols-clash.patch b/libsmi-c5830721-symbols-clash.patch new file mode 100644 index 0000000..6d155aa --- /dev/null +++ b/libsmi-c5830721-symbols-clash.patch @@ -0,0 +1,941 @@ +diff -up libsmi-c5830721/lib/smi-data.c.clash libsmi-c5830721/lib/smi-data.c +--- libsmi-c5830721/lib/smi-data.c.clash 2021-01-15 06:10:12.000000000 -0500 ++++ libsmi-c5830721/lib/smi-data.c 2024-01-05 09:22:07.729348354 -0500 +@@ -78,6 +78,7 @@ static Handle *lastHandlePtr = NULL; + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Handle *addHandle(const char *name) + { + Handle *handlePtr; +@@ -112,7 +113,7 @@ Handle *addHandle(const char *name) + * + *---------------------------------------------------------------------- + */ +- ++__attribute__ ((visibility ("internal"))) + void removeHandle(Handle *handlePtr) + { + if (handlePtr->prevPtr) { +@@ -149,6 +150,7 @@ void removeHandle(Handle *handlePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Handle *findHandleByName(const char *name) + { + Handle *handlePtr; +@@ -185,7 +187,7 @@ Handle *findHandleByName(const char *nam + * + *---------------------------------------------------------------------- + */ +- ++__attribute__ ((visibility ("internal"))) + View *addView(const char *modulename) + { + View *viewPtr; +@@ -220,6 +222,7 @@ View *addView(const char *modulename) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int isInView(const char *modulename) + { + View *viewPtr; +@@ -257,6 +260,7 @@ int isInView(const char *modulename) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *addModule(char *modulename, char *path, ModuleFlags flags, + Parser *parserPtr) + { +@@ -320,6 +324,7 @@ Module *addModule(char *modulename, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleIdentityObject(Module *modulePtr, Object *objectPtr) + { + modulePtr->objectPtr = objectPtr; +@@ -343,6 +348,7 @@ void setModuleIdentityObject(Module *mod + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleLastUpdated(Module *modulePtr, time_t lastUpdated) + { + modulePtr->lastUpdated = lastUpdated; +@@ -366,6 +372,7 @@ void setModuleLastUpdated(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleOrganization(Module *modulePtr, char *organization) + { + modulePtr->export.organization = organization; +@@ -392,6 +399,7 @@ void setModuleOrganization(Module *modul + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleContactInfo(Module *modulePtr, char *contactinfo) + { + modulePtr->export.contactinfo = contactinfo; +@@ -415,6 +423,7 @@ void setModuleContactInfo(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleDescription(Module *modulePtr, char *description, + Parser *parserPtr) + { +@@ -446,6 +455,7 @@ void setModuleDescription(Module *module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setModuleReference(Module *modulePtr, char *reference, Parser *parserPtr) + { + if (modulePtr->export.reference) { +@@ -478,6 +488,7 @@ void setModuleReference(Module *modulePt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *findModuleByName(const char *modulename) + { + Module *modulePtr; +@@ -511,6 +522,7 @@ Module *findModuleByName(const char *mod + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Revision *addRevision(time_t date, char *description, Parser *parserPtr) + { + Revision *revisionPtr, *r; +@@ -575,6 +587,7 @@ Revision *addRevision(time_t date, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setRevisionLine(Revision *revisionPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -604,6 +617,7 @@ void setRevisionLine(Revision *revisionP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *addImport(char *name, Parser *parserPtr) + { + Import *importPtr; +@@ -650,6 +664,7 @@ Import *addImport(char *name, Parser *pa + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addImportFlags(Import *importPtr, ImportFlags flags) + { + importPtr->flags |= flags; +@@ -673,6 +688,7 @@ void addImportFlags(Import *importPtr, I + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setImportModulename(Import *importPtr, char *modulename) + { + if (importPtr->export.module) { +@@ -701,6 +717,7 @@ void setImportModulename(Import *importP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int checkImports(Module *modulePtr, Parser *parserPtr) + { + int n = 0; +@@ -768,6 +785,7 @@ int checkImports(Module *modulePtr, Pars + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *findImportByName(const char *name, Module *modulePtr) + { + Import *importPtr; +@@ -807,6 +825,7 @@ Import *findImportByName(const char *nam + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Import *findImportByModulenameAndName(const char *modulename, + const char *name, Module *modulePtr) + { +@@ -844,6 +863,7 @@ Import *findImportByModulenameAndName(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *addObject(char *objectname, Node *parentNodePtr, SmiSubid subid, + ObjectFlags flags, Parser *parserPtr) + { +@@ -941,6 +961,7 @@ Object *addObject(char *objectname, Node + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *duplicateObject(Object *templatePtr, ObjectFlags flags, + Parser *parserPtr) + { +@@ -1021,6 +1042,7 @@ Object *duplicateObject(Object *template + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *addNode (Node *parentNodePtr, SmiSubid subid, NodeFlags flags, + Parser *parserPtr) + { +@@ -1098,6 +1120,7 @@ Node *addNode (Node *parentNodePtr, SmiS + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *createNodes(unsigned int oidlen, SmiSubid *oid) + { + Node *parentNodePtr, *nodePtr; +@@ -1135,6 +1158,7 @@ Node *createNodes(unsigned int oidlen, S + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *createNodesByOidString(const char *oid) + { + char *p, *elements; +@@ -1177,6 +1201,7 @@ Node *createNodesByOidString(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *getParentNode(Node *nodePtr) + { + return nodePtr->parentPtr; +@@ -1201,6 +1226,7 @@ Node *getParentNode(Node *nodePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + static void mergeNodeTrees(Node *toNodePtr, Node *fromNodePtr, + Parser *parserPtr) + { +@@ -1301,6 +1327,7 @@ static void mergeNodeTrees(Node *toNodeP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *setObjectName(Object *objectPtr, char *name, Parser *parserPtr) + { + Node *nodePtr, *nextPtr; +@@ -1401,6 +1428,7 @@ Object *setObjectName(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectType(Object *objectPtr, Type *typePtr) + { + objectPtr->typePtr = typePtr; +@@ -1424,6 +1452,7 @@ void setObjectType(Object *objectPtr, Ty + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectAccess(Object *objectPtr, SmiAccess access) + { + objectPtr->export.access = access; +@@ -1447,6 +1476,7 @@ void setObjectAccess(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectStatus(Object *objectPtr, SmiStatus status) + { + objectPtr->export.status = status; +@@ -1470,6 +1500,7 @@ void setObjectStatus(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectDescription(Object *objectPtr, char *description, + Parser *parserPtr) + { +@@ -1501,6 +1532,7 @@ void setObjectDescription(Object *object + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectReference(Object *objectPtr, char *reference, Parser *parserPtr) + { + if (objectPtr->export.reference) { +@@ -1531,6 +1563,7 @@ void setObjectReference(Object *objectPt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectFormat(Object *objectPtr, char *format) + { + if (objectPtr->export.format) smiFree(objectPtr->export.format); +@@ -1555,6 +1588,7 @@ void setObjectFormat(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectUnits(Object *objectPtr, char *units) + { + if (objectPtr->export.units) smiFree(objectPtr->export.units); +@@ -1579,6 +1613,7 @@ void setObjectUnits(Object *objectPtr, c + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectDecl(Object *objectPtr, SmiDecl decl) + { + objectPtr->export.decl = decl; +@@ -1602,6 +1637,7 @@ void setObjectDecl(Object *objectPtr, Sm + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectLine(Object *objectPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -1629,6 +1665,7 @@ void setObjectLine(Object *objectPtr, in + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectNodekind(Object *objectPtr, SmiNodekind nodekind) + { + objectPtr->export.nodekind = nodekind; +@@ -1652,6 +1689,7 @@ void setObjectNodekind(Object *objectPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addObjectFlags(Object *objectPtr, ObjectFlags flags) + { + objectPtr->flags |= flags; +@@ -1675,6 +1713,7 @@ void addObjectFlags(Object *objectPtr, O + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void deleteObjectFlags(Object *objectPtr, ObjectFlags flags) + { + objectPtr->flags &= ~flags; +@@ -1698,6 +1737,7 @@ void deleteObjectFlags(Object *objectPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + int checkObjectFlags(Object *objectPtr, ObjectFlags flags) + { + return ((objectPtr->flags & flags) == flags); +@@ -1748,6 +1788,7 @@ void setObjectIndex(Object *objectPtr, I + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectList(Object *objectPtr, List *listPtr) + { + objectPtr->listPtr = listPtr; +@@ -1771,6 +1812,7 @@ void setObjectList(Object *objectPtr, Li + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectRelated(Object *objectPtr, Object *relatedPtr) + { + objectPtr->relatedPtr = relatedPtr; +@@ -1794,6 +1836,7 @@ void setObjectRelated(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectImplied(Object *objectPtr, int implied) + { + objectPtr->export.implied = implied; +@@ -1817,6 +1860,7 @@ void setObjectImplied(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectCreate(Object *objectPtr, int create) + { + objectPtr->export.create = create; +@@ -1840,6 +1884,7 @@ void setObjectCreate(Object *objectPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectIndexkind(Object *objectPtr, SmiIndexkind indexkind) + { + objectPtr->export.indexkind = indexkind; +@@ -1863,6 +1908,7 @@ void setObjectIndexkind(Object *objectPt + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectValue(Object *objectPtr, SmiValue *valuePtr) + { + objectPtr->export.value = *valuePtr; +@@ -1887,6 +1933,7 @@ void setObjectValue(Object *objectPtr, S + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setObjectUniqueness(Object *objectPtr, List *listPtr) + { + objectPtr->uniquenessPtr = listPtr; +@@ -1934,6 +1981,7 @@ void setObjectUniqueness(Object *objectP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByParentAndSubid(Node *parentNodePtr, SmiSubid subid) + { + Node *nodePtr; +@@ -1970,6 +2018,7 @@ Node *findNodeByParentAndSubid(Node *par + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByOid(unsigned int oidlen, SmiSubid *oid) + { + Node *nodePtr; +@@ -2002,6 +2051,7 @@ Node *findNodeByOid(unsigned int oidlen, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Node *findNodeByOidString(char *oid) + { + Node *nodePtr; +@@ -2039,6 +2089,7 @@ Node *findNodeByOidString(char *oid) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByNode(Node *nodePtr) + { + Object *objectPtr; +@@ -2081,6 +2132,7 @@ Object *findObjectByNode(Node *nodePtr) + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModuleAndNode(Module *modulePtr, Node *nodePtr) + { + Object *objectPtr; +@@ -2116,6 +2168,7 @@ Object *findObjectByModuleAndNode(Module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModulenameAndNode(const char *modulename, Node *nodePtr) + { + Object *objectPtr; +@@ -2151,6 +2204,7 @@ Object *findObjectByModulenameAndNode(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByName(const char *objectname) + { + Module *modulePtr; +@@ -2195,6 +2249,7 @@ Object *findObjectByName(const char *obj + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findNextObjectByName(const char *objectname, Object *prevObjectPtr) + { + Module *modulePtr; +@@ -2238,6 +2293,7 @@ Object *findNextObjectByName(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModulenameAndName(const char *modulename, + const char *objectname) + { +@@ -2291,6 +2347,7 @@ Object *findObjectByModulenameAndName(co + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Object *findObjectByModuleAndName(Module *modulePtr, const char *objectname) + { + Object *objectPtr; +@@ -2340,6 +2397,7 @@ Object *findObjectByModuleAndName(Module + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *addType(char *type_name, SmiBasetype basetype, TypeFlags flags, + Parser *parserPtr) + { +@@ -2401,6 +2459,7 @@ Type *addType(char *type_name, SmiBasety + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *duplicateType(Type *templatePtr, TypeFlags flags, Parser *parserPtr) + { + Type *typePtr; +@@ -2457,6 +2516,7 @@ Type *duplicateType(Type *templatePtr, T + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *setTypeName(Type *typePtr, char *name) + { + Type *type2Ptr; +@@ -2549,6 +2609,7 @@ Type *setTypeName(Type *typePtr, char *n + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeParent(Type *typePtr, Type *parentPtr) + { + typePtr->parentPtr = parentPtr; +@@ -2572,6 +2633,7 @@ void setTypeParent(Type *typePtr, Type * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeStatus(Type *typePtr, SmiStatus status) + { + typePtr->export.status = status; +@@ -2595,6 +2657,7 @@ void setTypeStatus(Type *typePtr, SmiSta + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeBasetype(Type *typePtr, SmiBasetype basetype) + { + typePtr->export.basetype = basetype; +@@ -2618,6 +2681,7 @@ void setTypeBasetype(Type *typePtr, SmiB + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeDescription(Type *typePtr, char *description, Parser *parserPtr) + { + if (typePtr->export.description) { +@@ -2649,6 +2713,7 @@ void setTypeDescription(Type *typePtr, c + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeReference(Type *typePtr, char *reference, Parser *parserPtr) + { + if (typePtr->export.reference) { +@@ -2684,6 +2749,7 @@ void setTypeReference(Type *typePtr, cha + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeList(Type *typePtr, List *listPtr) + { + if (!typePtr->listPtr) { +@@ -2709,6 +2775,7 @@ void setTypeList(Type *typePtr, List *li + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeFormat(Type *typePtr, char *format) + { + if (typePtr->export.format) smiFree(typePtr->export.format); +@@ -2734,6 +2801,7 @@ void setTypeFormat(Type *typePtr, char * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeUnits(Type *typePtr, char *units) + { + if (typePtr->export.units) smiFree(typePtr->export.units); +@@ -2758,6 +2826,7 @@ void setTypeUnits(Type *typePtr, char *u + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeDecl(Type *typePtr, SmiDecl decl) + { + typePtr->export.decl = decl; +@@ -2781,6 +2850,7 @@ void setTypeDecl(Type *typePtr, SmiDecl + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeLine(Type *typePtr, int line, Parser *parserPtr) + { + if (line) { +@@ -2808,6 +2878,7 @@ void setTypeLine(Type *typePtr, int line + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setTypeValue(Type *typePtr, SmiValue *valuePtr) + { + typePtr->export.value = *valuePtr; +@@ -2831,6 +2902,7 @@ void setTypeValue(Type *typePtr, SmiValu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void addTypeFlags(Type *typePtr, TypeFlags flags) + { + typePtr->flags |= flags; +@@ -2854,6 +2926,7 @@ void addTypeFlags(Type *typePtr, TypeFla + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void deleteTypeFlags(Type *typePtr, TypeFlags flags) + { + typePtr->flags &= ~flags; +@@ -2878,6 +2951,7 @@ void deleteTypeFlags(Type *typePtr, Type + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type * findTypeByName(const char *type_name) + { + Module *modulePtr; +@@ -2916,6 +2990,7 @@ Type * findTypeByName(const char *type_n + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findNextTypeByName(const char *type_name, Type *prevTypePtr) + { + Module *modulePtr; +@@ -2954,6 +3029,7 @@ Type *findNextTypeByName(const char *typ + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findTypeByModulenameAndName(const char *modulename, + const char *type_name) + { +@@ -2993,6 +3069,7 @@ Type *findTypeByModulenameAndName(const + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Type *findTypeByModuleAndName(Module *modulePtr, const char *type_name) + { + Type *typePtr; +@@ -3025,6 +3102,7 @@ Type *findTypeByModuleAndName(Module *mo + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + NamedNumber *findTypeNamedNumber(Type *typePtr, + SmiInteger32 number) + { +@@ -3058,6 +3136,7 @@ NamedNumber *findTypeNamedNumber(Type *t + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Identity *addIdentity(char *identityname, Parser *parserPtr) + { + Identity *identityPtr; +@@ -3104,6 +3183,7 @@ Identity *addIdentity(char *identityname + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityDecl(Identity *identityPtr, SmiDecl decl) + { + identityPtr->export.decl = decl; +@@ -3125,6 +3205,7 @@ void setIdentityDecl(Identity *identityP + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityStatus(Identity *identityPtr, SmiStatus status) + { + identityPtr->export.status = status; +@@ -3148,6 +3229,7 @@ void setIdentityStatus(Identity *identit + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityDescription(Identity *identityPtr, char *description, Parser *parserPtr) + { + if (identityPtr->export.description) { +@@ -3179,6 +3261,7 @@ void setIdentityDescription(Identity *id + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityReference(Identity *identityPtr, char *reference, Parser *parserPtr) + { + if (identityPtr->export.reference) { +@@ -3208,6 +3291,7 @@ void setIdentityReference(Identity *iden + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setIdentityParent(Identity *identityPtr, Identity *parentPtr) + { + if(identityPtr) identityPtr->parentPtr = parentPtr; +@@ -3231,6 +3315,7 @@ void setIdentityParent(Identity *identit + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByName(const char *identityname) + { + Module *modulePtr; +@@ -3267,6 +3352,7 @@ Identity *findIdentityByName(const char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByModuleAndName(Module *modulePtr, + const char *identityname) + { +@@ -3302,6 +3388,7 @@ Identity *findIdentityByModuleAndName(Mo + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Identity *findIdentityByModulenameAndName(const char *modulename, + const char *identity_name) + { +@@ -3340,6 +3427,7 @@ Identity *findIdentityByModulenameAndNam + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Class *addClass(char *classname, Parser *parserPtr) + { + Class *classPtr; +@@ -3391,6 +3479,7 @@ Class *addClass(char *classname, Parser + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassDecl(Class *classPtr, SmiDecl decl) + { + classPtr->export.decl = decl; +@@ -3412,6 +3501,7 @@ void setClassDecl(Class *classPtr, SmiDe + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassStatus(Class *classPtr, SmiStatus status) + { + classPtr->export.status = status; +@@ -3435,6 +3525,7 @@ void setClassStatus(Class *classPtr, Smi + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassDescription(Class *classPtr, char *description, Parser *parserPtr) + { + if (classPtr->export.description) { +@@ -3466,6 +3557,7 @@ void setClassDescription(Class *classPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassReference(Class *classPtr, char *reference, Parser *parserPtr) + { + if (classPtr->export.reference) { +@@ -3495,6 +3587,7 @@ void setClassReference(Class *classPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setClassParent(Class *classPtr, Class *parentPtr) + { + if(classPtr) classPtr->parentPtr = parentPtr; +@@ -3516,6 +3609,7 @@ void setClassParent(Class *classPtr, Cla + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + Class *findClassByModuleAndName(Module *modulePtr,char *name) + { + Class *classPtr; +@@ -3548,6 +3642,7 @@ Class *findClassByModuleAndName(Module * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Class *findClassByModulenameAndName(const char *modulename, + const char *class_name) + { +@@ -3586,6 +3681,7 @@ Class *findClassByModulenameAndName(cons + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Attribute *duplicateTypeToAttribute(Type *templatePtr, Class *classPtr, Parser *parserPtr) + { + Attribute *attributePtr; +@@ -3640,6 +3736,7 @@ Attribute *duplicateTypeToAttribute(Type + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Attribute *addAttribute(char *attribute_name, + Class *classPtr, Parser *parserPtr) + { +@@ -3694,6 +3791,7 @@ Attribute *addAttribute(char *attribute_ + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeDecl(Attribute *attributePtr, SmiDecl decl) + { + attributePtr->export.decl = decl; +@@ -3715,6 +3813,7 @@ void setAttributeDecl(Attribute *attribu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeParentType(Attribute *attributePtr, Type *parentPtr) + { + attributePtr->parentTypePtr = parentPtr; +@@ -3736,6 +3835,7 @@ void setAttributeParentType(Attribute *a + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeParentClass(Attribute *attributePtr, Class *parentPtr) + { + attributePtr->parentClassPtr = parentPtr; +@@ -3760,6 +3860,7 @@ void setAttributeParentClass(Attribute * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeList(Attribute *attributePtr, List *listPtr) + { + if (!attributePtr->listPtr) { +@@ -3783,6 +3884,7 @@ void setAttributeList(Attribute *attribu + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setAttributeName(Attribute *attributePtr, char *name) + { + +@@ -3804,6 +3906,7 @@ void setAttributeName(Attribute *attribu + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + void setAttributeAccess(Attribute *attributePtr,SmiAccess access) + { + attributePtr->export.access = access; +@@ -3826,6 +3929,7 @@ void setAttributeAccess(Attribute *attri + * + *---------------------------------------------------------------------- + */ ++__attribute__ ((visibility ("internal"))) + Event *addEvent(char *eventname, Class *classPtr, + Parser *parserPtr) + { +@@ -3875,6 +3979,7 @@ Event *addEvent(char *eventname, Class * + * + *---------------------------------------------------------------------- */ + ++__attribute__ ((visibility ("internal"))) + Macro *addMacro(char *macroname, MacroFlags flags, Parser *parserPtr) + { + Macro *macroPtr; +@@ -3924,6 +4029,7 @@ Macro *addMacro(char *macroname, MacroFl + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroStatus(Macro *macroPtr, SmiStatus status) + { + macroPtr->export.status = status; +@@ -3947,6 +4053,7 @@ void setMacroStatus(Macro *macroPtr, Smi + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroDescription(Macro *macroPtr, char *description, Parser *parserPtr) + { + if (macroPtr->export.description) { +@@ -3978,6 +4085,7 @@ void setMacroDescription(Macro *macroPtr + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroReference(Macro *macroPtr, char *reference, Parser *parserPtr) + { + if (macroPtr->export.reference) { +@@ -4007,6 +4115,7 @@ void setMacroReference(Macro *macroPtr, + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroAbnf(Macro *macroPtr, char *abnf, Parser *parserPtr) + { + if (macroPtr->export.abnf) { +@@ -4038,6 +4147,7 @@ void setMacroAbnf(Macro *macroPtr, char + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroDecl(Macro *macroPtr, SmiDecl decl) + { + macroPtr->export.decl = decl; +@@ -4061,6 +4171,7 @@ void setMacroDecl(Macro *macroPtr, SmiDe + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + void setMacroLine(Macro *macroPtr, int line, Parser *parserPtr) + { + if (line) { +@@ -4089,6 +4200,7 @@ void setMacroLine(Macro *macroPtr, int l + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Macro *findMacroByName(const char *macroname) + { + Module *modulePtr; +@@ -4127,6 +4239,7 @@ Macro *findMacroByName(const char *macro + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Macro *findMacroByModuleAndName(Module *modulePtr, const char *macroname) + { + Macro *macroPtr; +@@ -4162,6 +4275,7 @@ Macro *findMacroByModuleAndName(Module * + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + NamedNumber *findNamedNumberByName(Type *typePtr,const char *name) + { + List *listPtr; +@@ -4593,6 +4707,7 @@ void smiFreeData() + *---------------------------------------------------------------------- + */ + ++__attribute__ ((visibility ("internal"))) + Module *loadModule(const char *modulename, Parser *parserPtr) + { + Parser parser; diff --git a/libsmi-c5830721-test-fix-typo.patch b/libsmi-c5830721-test-fix-typo.patch new file mode 100644 index 0000000..f0066b4 --- /dev/null +++ b/libsmi-c5830721-test-fix-typo.patch @@ -0,0 +1,12 @@ +diff -up libsmi-c5830721/test/mibs/LIBSMI-TEST-016-MIB.fix-typo libsmi-c5830721/test/mibs/LIBSMI-TEST-016-MIB +--- libsmi-c5830721/test/mibs/LIBSMI-TEST-016-MIB.fix-typo 2024-01-05 11:21:28.131480471 -0500 ++++ libsmi-c5830721/test/mibs/LIBSMI-TEST-016-MIB 2024-01-05 11:21:38.674627907 -0500 +@@ -42,7 +42,7 @@ LIBSMI-TEST-016-MIB:207: warning: node ` + LIBSMI-TEST-016-MIB:200: warning: node `t4Addr' must be contained in at least one conformance group + LIBSMI-TEST-016-MIB:214: warning: node `t4AddrIPv6z' must be contained in at least one conformance group + LIBSMI-TEST-016-MIB:207: warning: `InetAddressType' should not be subtyped +-LIBSMI-TEST-016-MIB:200: warning: `InetAddress' object should have an accompanied preceding `InetAdressType' object ++LIBSMI-TEST-016-MIB:200: warning: `InetAddress' object should have an accompanied preceding `InetAddressType' object + LIBSMI-TEST-016-MIB:214: warning: `InetAddress' should be used instead of `InetAddressIPv6z' + " + REVISION "200211190000Z" diff --git a/libsmi-c99.patch b/libsmi-c99.patch index 6ffead5..761ae81 100644 --- a/libsmi-c99.patch +++ b/libsmi-c99.patch @@ -8,19 +8,6 @@ Submitted upstream: -diff --git a/lib/parser-sming.c b/lib/parser-sming.c -index 823b5a73773275f7..00a1391820f21a16 100644 ---- a/lib/parser-sming.c -+++ b/lib/parser-sming.c -@@ -227,7 +227,7 @@ - - #ifdef BACKEND_SMING - --#define _ISOC99_SOURCE -+ - #include - #include - #include diff --git a/lib/parser-sming.y b/lib/parser-sming.y index 555e570613ad689f..32bddeac93eac7e8 100644 --- a/lib/parser-sming.y @@ -34,3 +21,14 @@ index 555e570613ad689f..32bddeac93eac7e8 100644 #include #include #include +diff -up a/lib/parser-yang.y b/lib/parser-yang.y +--- a/lib/parser-yang.y 2024-01-05 09:28:40.994847831 -0500 ++++ b/lib/parser-yang.y 2024-01-05 09:28:54.247033152 -0500 +@@ -20,7 +20,6 @@ + + #ifdef BACKEND_YANG + +-#define _ISOC99_SOURCE + #include + #include + #include diff --git a/libsmi.spec b/libsmi.spec index 8b2aa53..2fe8992 100644 --- a/libsmi.spec +++ b/libsmi.spec @@ -1,24 +1,32 @@ -Name: libsmi -Version: 0.4.8 -Release: 34%{?dist} -Summary: A library to access SMI MIB information +# Upstream was putting changes silently into svn over a number of years +# When they moved to gitlab, this became visible +# It does not seem that they've ever done a proper release since 0.4.8 +# Leaving the version as is and using the gitlab source from the latest commit (2021) +%global commit c5830721 -License: GPLv2+ and BSD -URL: http://www.ibr.cs.tu-bs.de/projects/libsmi/index.html -Source0: ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/%{name}-%{version}.tar.gz -Source1: smi.conf +Name: libsmi +Version: 0.4.8 +Release: 35%{?dist} +Summary: A library to access SMI MIB information +License: GPL-2.0-or-later AND BSD-3-Clause +URL: http://www.ibr.cs.tu-bs.de/projects/libsmi/index.html +Source0: https://gitlab.ibr.cs.tu-bs.de/nm/libsmi/-/archive/%{commit}/libsmi-%{commit}.tar.gz +Source1: smi.conf Source2: IETF-MIB-LICENSE.txt Patch0: libsmi-0.4.8-wget111.patch -Patch1: libsmi-0.4.8-CVE-2010-2891.patch -Patch2: libsmi-0.4.8-symbols-clash.patch -Patch3: libsmi-0.4.8-format-security-fix.patch -Patch4: libsmi-configure-c99.patch -Patch5: libsmi-c99.patch - -BuildRequires: libtool -BuildRequires: flex, bison -BuildRequires: make -Requires: gawk, wget +Patch2: libsmi-c5830721-symbols-clash.patch +Patch4: libsmi-c5830721-configure-c99.patch +Patch5: libsmi-c99.patch +Patch6: libsmi-c5830721-fix-missing-declaration.patch +Patch7: libsmi-c5830721-switch-fixes.patch +Patch8: libsmi-c5830721-include-fix.patch +Patch9: libsmi-c5830721-missing-semicolon.patch +Patch10: libsmi-c5830721-cleanups.patch +Patch11: libsmi-c5830721-test-fix-typo.patch +BuildRequires: libtool +BuildRequires: flex, bison +BuildRequires: make +Requires: gawk, wget %description Libsmi is a C library to access MIB module information through @@ -31,9 +39,9 @@ of all IETF and IANA maintained standard MIB modules. %package devel -Summary: Development environment for libsmi library -Requires: %name = %version-%release -Requires: pkgconfig +Summary: Development environment for libsmi library +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig %description devel Libsmi is a C library to access MIB module information through @@ -44,16 +52,23 @@ This package contains development files needed to develop libsmi-based applications. %prep -%setup -q -%patch0 -p1 -b .wget111 -%patch1 -p1 -b .CVE-2010-2891 -%patch2 -p1 -b .clash -%patch3 -p1 -b .format-security -%patch4 -p1 -%patch5 -p1 -# Avoid re-running bison. The regeneration appears to break the generated -# C code. -touch -r lib/parser-sming.y lib/parser-sming.c +%setup -q -n %{name}-%{commit} +%patch -P 0 -p1 -b .wget111 +%patch -P 2 -p1 -b .clash +%patch -P 4 -p1 +%patch -P 5 -p1 +%patch -P 6 -p1 -b .fix-missing-declaration +%patch -P 7 -p1 -b .switch-fixes +%patch -P 8 -p1 -b .include-fix +%patch -P 9 -p1 -b .missing-semicolon +%patch -P 10 -p1 -b .cleanups +%patch -P 11 -p1 -b .fix-test-typo + +# We need to prime the pump here. +pushd lib +bison -v -t -d -psming parser-sming.y +bison -v -t -d -pyang parser-yang.y +popd cp %{SOURCE2} . %build @@ -70,8 +85,7 @@ mv COPYING.utf8 COPYING %install rm -rf $RPM_BUILD_ROOT - -make install DESTDIR=$RPM_BUILD_ROOT +%{make_install} install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir} install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/smi.conf @@ -80,7 +94,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %check -# fails a couple of tests (2 in {0.4.4, 0.4.5}) +# fails a couple of tests (2 in {0.4.4, 0.4.5}, 3 as of 2024-01-03) +# BUT... it shouldn't segfault or crash. make check ||: %ldconfig_scriptlets @@ -95,6 +110,7 @@ make check ||: %{_libdir}/*.so.* %{_datadir}/mibs/ %{_datadir}/pibs/ +%{_datadir}/yang/ %{_mandir}/man1/*.1* %files devel @@ -106,6 +122,9 @@ make check ||: %changelog +* Fri Jan 5 2024 Tom Callaway - 0.4.8-35 +- update to the latest available source tree, cleanup as much as we can + * Thu Jul 20 2023 Fedora Release Engineering - 0.4.8-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild