Date: Sun, 21 Jun 2020 08:24:54 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 247456] ports-mgmt/pkg use of .note.tag to determine osname Message-ID: <bug-247456-32340-5ABMceTHFV@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-247456-32340@https.bugs.freebsd.org/bugzilla/> References: <bug-247456-32340@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg mailing li= st <pkg@FreeBSD.org> for maintainer-feedback: Bug 247456: ports-mgmt/pkg use of .note.tag to determine osname https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247456 --- Description --- When the innocuous define of NOTE_FREEBSD_VENDOR is changed from #define NOTE_FREEBSD_VENDOR "FreeBSD" in=20 /usr/src/lib/csu/common/notes.h to contain something other than FreeBSD (I'm storing build/date details) AND=20 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 syste= m as a result of upgrading stable 12.1 to a later revision?? Explicitly stating the ABI in /usr/local/etc/pkg.conf as=20 ABI =3D "freebsd:12:x86:64"; enabled pkg to function. However every invocation of pkg now results in=20 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 ad= vise that changing NOTE_FREEBSD_VENDOR will impact the pkg's OS detection mechan= ism 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 wou= ld be to add an ELF section explicit for pkg to utilize (something like) #define PKG_OS FreeBSD=20 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) :-(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247456-32340-5ABMceTHFV>