Bug 271876 - security/py-omemo-dr New port: a Python OMEMO Crypto Library
Summary: security/py-omemo-dr New port: a Python OMEMO Crypto Library
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: Matthew Seaman
URL: https://dev.gajim.org/gajim/omemo-dr
Keywords:
Depends on:
Blocks: 274490
  Show dependency treegraph
 
Reported: 2023-06-07 04:06 UTC by Alastair Hogge
Modified: 2023-11-16 08:13 UTC (History)
4 users (show)

See Also:


Attachments
New port: security/omemo-dr a Python OMEMO Crypto Library (2.15 KB, patch)
2023-06-07 04:06 UTC, Alastair Hogge
no flags Details | Diff
New port: security/omemo-dr a Python OMEMO Crypto Library (2.15 KB, patch)
2023-06-07 04:21 UTC, Alastair Hogge
no flags Details | Diff
New port: security/py-omemo-dr a Python OMEMO Crypto Library (2.19 KB, patch)
2023-06-15 13:07 UTC, Alastair Hogge
no flags Details | Diff
omemo-dr 1.0.1 with pypi and setuptools63 (2.76 KB, patch)
2023-11-15 08:24 UTC, Ruslan Makhmatkhanov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Hogge 2023-06-07 04:06:50 UTC
Created attachment 242647 [details]
New port: security/omemo-dr a Python OMEMO Crypto Library

This port will be required for an update of Gajim to 1.8.0
Comment 1 Alastair Hogge 2023-06-07 04:21:55 UTC
Created attachment 242648 [details]
New port: security/omemo-dr a Python OMEMO Crypto Library

port{clippy,fmt,lint} work.

Not sure on whether to prefix port with py- or not.
Comment 2 Matthew Seaman freebsd_committer freebsd_triage 2023-06-07 07:21:45 UTC
(In reply to Alastair Hogge from comment #1)

Yes, this port should have a py- prefix.  It's a library module for use in python programming.
Comment 3 Alastair Hogge 2023-06-07 08:45:15 UTC
(In reply to Matthew Seaman from comment #2)
Thank you, I will sort that out.
Comment 4 Alastair Hogge 2023-06-15 13:07:34 UTC
Created attachment 242792 [details]
New port: security/py-omemo-dr a Python OMEMO Crypto Library

Move to py- prefix.

I have not yet tested this with devel/py-setuptools-63.1.0, I am using a local patch to update py-setuptools to 67.8.0, which I think is required by net-im/py-nbxmpp.
Comment 5 Matthew Seaman freebsd_committer freebsd_triage 2023-06-17 22:53:54 UTC
Unfortunately this fails to build:
```
=======================<phase: build          >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building for py39-omemo-dr-1.0.0
* Getting build dependencies for wheel...
/usr/local/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:104: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
  warnings.warn(msg, _BetaConfiguration)
running egg_info
creating src/omemo_dr.egg-info
writing src/omemo_dr.egg-info/PKG-INFO
writing dependency_links to src/omemo_dr.egg-info/dependency_links.txt
writing requirements to src/omemo_dr.egg-info/requires.txt
writing top-level names to src/omemo_dr.egg-info/top_level.txt
writing manifest file 'src/omemo_dr.egg-info/SOURCES.txt'
reading manifest file 'src/omemo_dr.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/omemo_dr.egg-info/SOURCES.txt'

ERROR Missing dependencies:
	setuptools>=65.0.0
*** Error code 1

Stop.
make: stopped in /usr/ports/security/py-omemo-dr
```
where the devel/py-setuptools port is currently at 63.1.0 but the omemo_dr package requires >=65.0.0 

Let's explore getting devel/py-setuptools upgraded, if possible.  As that's a build dependency for the majority of the python modules in ports it will need an exp-run to demonstrate no major regressions.
Comment 6 Alastair Hogge 2023-06-18 00:18:52 UTC
There is still some work to be done, by the looks of it, bug #270358.
Comment 7 Alastair Hogge 2023-06-18 00:21:17 UTC
More information on bug #270510: python.mk: remove setuptools from RUN_DEPENDS
Comment 8 pyrus 2023-11-11 00:49:26 UTC
Could using Python 3.10 or 3.11 work out better than 3.9?

Aside from installing everything from the Ports system,
pip3.11 install -v --user gajim-1.8.3.tar.gz
is said to work on FreeBSD. He wrote all other dependency requirements were met.

https://forums.freebsd.org/threads/omemo-for-xmpp-on-freebsd.90599/post-627809 is the conversation. He mentioned OMEMO as working with that, though that's not in that conversation.
Comment 9 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2023-11-15 08:24:53 UTC
Created attachment 246327 [details]
omemo-dr 1.0.1 with pypi and setuptools63

Hello. If I understand correctly dependency on setuptools65+ is only required to fix this warning at build stage:

```
/usr/local/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py:104: _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*.
  warnings.warn(msg, _BetaConfiguration)
```

So it's safe to lower the requirement to setuptools63 temporary to make thing works.
Here is the updated patch that makes exactly this. The omemo-dr distribution is also available at PYPI, so I changed that too to simplify the port. Now everything works as expected.
Comment 10 Alastair Hogge 2023-11-15 12:39:52 UTC
Ohhhh very awesome, thanks.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-11-16 08:11:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22e0a974790709a32f73c1f1d9c4f6666fa39cc4

commit 22e0a974790709a32f73c1f1d9c4f6666fa39cc4
Author:     Ruslan Makhmatkhanov <rm@FreeBSD.org>
AuthorDate: 2023-11-15 08:15:56 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-11-16 08:10:05 +0000

    security/py-omemo-dr: New port

    Python library initially forked from python-axolotl, heavily
    rewritten, focusing only on OMEMO cryptographic sessions, and not on
    communication protocols.

    PR:             271876
    Co-Authored-By: Alastair Hogge <agh@riseup.net>

 security/Makefile                                  |  1 +
 security/py-omemo-dr/Makefile (new)                | 23 ++++++++++++++++++++++
 security/py-omemo-dr/distinfo (new)                |  3 +++
 .../py-omemo-dr/files/patch-pyproject.toml (new)   |  9 +++++++++
 security/py-omemo-dr/pkg-descr (new)               |  2 ++
 5 files changed, 38 insertions(+)
Comment 12 Matthew Seaman freebsd_committer freebsd_triage 2023-11-16 08:13:15 UTC
Committed with minor changes to hook the port up to the build. Thanks!