When the innocuous define of NOTE_FREEBSD_VENDOR is changed from #define NOTE_FREEBSD_VENDOR "FreeBSD" in /usr/src/lib/csu/common/notes.h to contain something other than FreeBSD (I'm storing build/date details) AND there is no ABI statement explicit in /usr/local/etc/pkg.conf these messages are emitted from a 'pkg info -oa' pkg: failed to get the note section pkg: failed to get the note section pkg: Unable to determine ABI pkg: Cannot parse configuration file! This was a major surprise when I upgraded the OS. What broke the pkg system as a result of upgrading stable 12.1 to a later revision?? Explicitly stating the ABI in /usr/local/etc/pkg.conf as ABI = "freebsd:12:x86:64"; enabled pkg to function. However every invocation of pkg now results in pkg: failed to get the note section pkg: failed to get the note section Suggestions 1) that a dependency notice appear in /usr/src/lib/csu/common/notes.h to advise that changing NOTE_FREEBSD_VENDOR will impact the pkg's OS detection mechanism which will require maintenance of the ABI in /usr/local/etc/pkg.conf. 2) pkg suppresses the failure notice as the explicit use of the ABI is sufficient. 3) I would think that a variable named NOTE_FREEBSD_VENDOR could be used by vendors in a manner of their choosing. Though perhaps a better approach would be to add an ELF section explicit for pkg to utilize (something like) #define PKG_OS FreeBSD in /usr/src/lib/csu/common/notes.h if elf section checking is the best route (?) (And yes, I know that the latter (3) is no small task) :-(
I have messed this issue and while I understand it I don't see how to support that properly and if I should even support such case, with more arguments I could reconsider my position :D