Bug 255693 - New port: net/jose: Performing tasks on JSON Object Signing and Encryption objects
Summary: New port: net/jose: Performing tasks on JSON Object Signing and Encryption ob...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Neel Chauhan
URL: https://github.com/latchset/jose
Keywords:
Depends on:
Blocks: 255694
  Show dependency treegraph
 
Reported: 2021-05-07 23:12 UTC by Howard Holm
Modified: 2021-05-10 01:24 UTC (History)
3 users (show)

See Also:


Attachments
The port files in diff format (2.45 KB, patch)
2021-05-07 23:12 UTC, Howard Holm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Howard Holm 2021-05-07 23:12:57 UTC
Created attachment 224757 [details]
The port files in diff format

A new port of github.com/latchset/jose

Jose is a command line utility for performing various tasks on JSON
Object Signing and Encryption (JOSE) objects. Jose provides a full
crypto stack including key generation, signing and encryption.

This is required for tang, which is being separately submitted.
Comment 1 Neel Chauhan freebsd_committer freebsd_triage 2021-05-09 18:35:10 UTC
You shouldn't be using:

DEFAULT_VERSIONS+=	ssl=openssl

in your port.

I do know why you added this: you get an "libcrypto not found" error without it. But IMHO it's a better idea to patch the meson.build file.
Comment 2 Howard Holm 2021-05-09 19:54:16 UTC
I'm relatively new to FreeBSD.  I looked around on-line and I really don't understand 1) why it's not found - it looks like the library should be found by the default build, and 2) what I would even "patch" to fix this, and frankly 3) why DEFAULT_VERSIONS+=	ssl=openssl fixes it beyond that was the only advice I was able to find.
Comment 3 Neel Chauhan freebsd_committer freebsd_triage 2021-05-10 01:04:45 UTC
Patching meson.build to see the base system's OpenSSL if it exists can remove a dependency.

The patch is something like this:

--- meson.build.orig    2021-05-10 00:54:04 UTC
+++ meson.build
@@ -38,7 +38,7 @@ add_project_arguments(
 zlib = dependency('zlib')
 threads = dependency('threads')
 jansson = dependency('jansson', version: '>=2.10')
-libcrypto = dependency('libcrypto', version: '>=1.0.2')
+libcrypto = meson.get_compiler('c').find_library('crypto', dirs: [ '/usr/lib/' ])
 a2x = find_program('a2x', required: false)
 
 mans = []

Then, we don't need to depend on the openssl port.

I will commit the port with the said modification.
Comment 4 Neel Chauhan freebsd_committer freebsd_triage 2021-05-10 01:24:04 UTC
Committed!
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-05-10 01:24:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9ed3c429038c25725a47d5bac72283fc87c4adab

commit 9ed3c429038c25725a47d5bac72283fc87c4adab
Author:     Howard Holm <hdholm@alumni.iastate.edu>
AuthorDate: 2021-05-10 01:05:46 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-05-10 01:23:51 +0000

    New port: net/jose: Performing tasks on JSON Object Signing and Encryption objects

    PR:     255693

 net/Makefile                           |  1 +
 net/jose/Makefile (new)                | 22 ++++++++++++++++++++
 net/jose/distinfo (new)                |  3 +++
 net/jose/files/patch-meson.build (new) | 20 ++++++++++++++++++
 net/jose/pkg-descr (new)               |  5 +++++
 net/jose/pkg-plist (new)               | 37 ++++++++++++++++++++++++++++++++++
 6 files changed, 88 insertions(+)