Page MenuHomeFreeBSD

connect libcbor to the build
ClosedPublic

Authored by emaste on Oct 7 2021, 12:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 7:02 PM
Unknown Object (File)
Fri, Oct 18, 1:43 PM
Unknown Object (File)
Sep 23 2024, 4:13 PM
Unknown Object (File)
Sep 23 2024, 4:13 PM
Unknown Object (File)
Sep 23 2024, 4:13 PM
Unknown Object (File)
Sep 23 2024, 7:32 AM
Unknown Object (File)
Sep 23 2024, 7:25 AM
Unknown Object (File)
Sep 23 2024, 5:21 AM

Details

Summary

Enabling FIDO/U2F in ssh needs this, libfido2, and changes to ssh itself. I will iterate on this in three separate reviews.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

Examples (one of each type) of errors from default WARNS:

/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/arrays.h:99:51: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
CBOR_EXPORT cbor_item_t* cbor_new_indefinite_array();
                                                  ^
                                                   void
...
/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/arrays.c:122:14: error: no previous prototype for function 'cbor_new_indefinite_array' [-Werror,-Wmissing-prototypes]
...
/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/arrays.c:122:39: error: this old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes]
/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/arrays.c:23:23: error: cast from 'unsigned char *' to 'cbor_item_t **' (aka 'struct cbor_item_t **') increases required alignment from 1 to 8 [-Werror,-Wcast-align]
  return cbor_incref(((cbor_item_t **)item->data)[index]);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/callbacks.c:13:37: error: unused parameter '_ctx' [-Werror,-Wunused-parameter]
/usr/home/emaste/src/freebsd-git/main/contrib/libcbor/src/cbor/streaming.c:101:66: error: missing field 'required' initializer [-Werror,-Wmissing-field-initializers]
lib/libcbor/Makefile
10

I used the NetBSD convention here (DIST) to avoid conflicting with LIBCBORDIR set in src.libnames.mk.

  • skip libcbor / libfido2 on compat32 build
lib/Makefile
218

libfido2 is not compatible with the COMPAT_32BIT hack in usb_ioctl.h so I plan to just skip libcbor and libfido2 from lib32 for now - they are PRIVATELIB used only by ssh-sk-helper so need for them anyway

kevans added inline comments.
tools/build/mk/OptionalObsoleteFiles.inc
7122

?

tools/build/mk/OptionalObsoleteFiles.inc
7122

ah, should just be deleted - /usr/lib/debug is handled automatically
but should be OLD_LIBS instead

fix up OptionalObsoleteFiles.inc thanks @kevans

emaste added inline comments.
tools/build/mk/OptionalObsoleteFiles.inc
7123–7125

As a separate change all of the usr/lib/private/libfoo entries in this file should move to ObsoleteFiles.inc, and be replaced with usr/lib/libprivatefoo in here; I'll pick that up in a bit

See R10:5551c573554e4bb755565098222d0d74fa83e5cb
CC @bapt

I don't see anything else concerning. :-)

This revision is now accepted and ready to land.Oct 10 2021, 3:41 AM
This revision was automatically updated to reflect the committed changes.