[Bug 247456] ports-mgmt/pkg use of .note.tag to determine osname

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jun 21 08:24:55 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247456

            Bug ID: 247456
           Summary: ports-mgmt/pkg use of .note.tag to determine osname
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: pkg at FreeBSD.org
          Reporter: dewayne at heuristicsystems.com.au
          Assignee: pkg at FreeBSD.org
             Flags: maintainer-feedback?(pkg at FreeBSD.org)

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) :-(

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-pkg mailing list