Bug 273554 - [NEW PORT] www/py-offpunk Offline-first browser
Summary: [NEW PORT] www/py-offpunk Offline-first browser
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: Joel Bodenmann
URL: https://git.sr.ht/~lioploum/offpunk
Keywords:
Depends on: 273553
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-04 05:39 UTC by Martin Neubauer
Modified: 2023-10-30 14:16 UTC (History)
2 users (show)

See Also:


Attachments
patch adding www/py-offpunk (3.67 KB, patch)
2023-09-04 05:39 UTC, Martin Neubauer
m.ne: maintainer-approval+
Details | Diff
Updated patch (3.62 KB, patch)
2023-10-03 13:50 UTC, Martin Neubauer
m.ne: maintainer-approval+
Details | Diff
Patch with streamlined dependencies (2.51 KB, patch)
2023-10-03 18:22 UTC, Martin Neubauer
no flags Details | Diff
patch adding www/offpunk (3.50 KB, patch)
2023-10-03 21:35 UTC, Martin Neubauer
m.ne: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Neubauer 2023-09-04 05:39:28 UTC
Created attachment 244626 [details]
patch adding www/py-offpunk

Add port of the offpunk browser
Comment 1 Joel Bodenmann freebsd_committer freebsd_triage 2023-09-29 15:21:30 UTC
Could you please rectify the QA complains reported by portlint and portclippy?

Furthermore, the port subdir and PORTNAME are different. These should be the same (most likely www/offpunk in this particular case).
Comment 2 Martin Neubauer 2023-10-03 13:50:03 UTC
Created attachment 245406 [details]
Updated patch

For the new patch I fixed the portlint complaints (I really don't know how I missed such blatant mistakes in the first place...) and changed the port directory as suggested.

The remaining complaints by portclippy concern only the ordering of the port options. There I deliberately chose a functional grouping over the purely alphanumeric sorting portclippy suggests. That's just a personal preference and one I'm not too hung up on, so I'll happily change that as well if the port won't get committed otherwise.
Comment 3 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-03 15:13:14 UTC
Thanks - that's already looking much better!

Did you do a runtime test on this? I only tried with the interactive mode of poudriere-testport:

\Traceback (most recent call last):
  File "/usr/local/bin/offpunk", line 5, in <module>
    from offpunk import main
  File "/usr/local/lib/python3.9/site-packages/offpunk.py", line 39, in <module>
    import sqlite3
  File "/usr/local/lib/python3.9/sqlite3/__init__.py", line 57, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.9/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

Any chance that this is missing a dependency?
Comment 4 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-03 15:15:03 UTC
Also a question regarding the BOTH option: Is there a particular reason why the CHAFA and the TIMG option can not simply be non-mutually exclusive essentially dropping the need for the BOTH option?
Comment 5 Martin Neubauer 2023-10-03 18:21:50 UTC
(In reply to Joel Bodenmann from comment #3)
I did in fact test the program, however only on a "normal" system that has py-sqlite3 installed as a dependency for other packages. This meant that I didn't run into this problem. (Mainly this is a consequence of separating out core modules from the main python package in FreeBSD which many Linux-only developers seem unaware of.)

As to the dependency options, the upstream project page has this to say:

- Chafa allows to display pictures in your console. Install it and browse to an HTML page with picture to see the magic.
- Timg is a slower alternative to chafa for inline images. But it has better rendering when displaying only the image. Install both to get the best of both world but if you need to choose one, choose Chafa.

Because of this I set up the options to allow for the different combinations. Having re-read this (and the surrounding context) again, I tend towards either adding both as regular dependencies, or unconditionally depending on chafa with timg being optional.
Comment 6 Martin Neubauer 2023-10-03 18:22:39 UTC
Created attachment 245413 [details]
Patch with streamlined dependencies
Comment 7 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-03 19:33:22 UTC
Could you update the attached patch to contain everything? It seems like the currently non-obsolete attachment is the diff to your original diff.

Regarding the options: I might be misunderstanding something here, but why not just have both the CHAFA option and the TIMG option as separate options which can be enabled/disabled individually like you had it originally but simply dropping the BOTH option? This way a user can choose CHAFA or TIMG or both (by just allowing to enable both). I'm mainly questioning why the option BOTH exists. If a user wants to have both, they can just enable the CHAFA and the TIMG options at the same time.
Comment 8 Martin Neubauer 2023-10-03 21:35:29 UTC
Created attachment 245418 [details]
patch adding www/offpunk
Comment 9 Martin Neubauer 2023-10-03 21:38:34 UTC
(In reply to Joel Bodenmann from comment #7)
I don't think you are misunderstanding anything. I suspect I was just overcomplicating things when first creating the port. The new patch should be okay now.

Thanks for your patience.
Comment 10 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-07 14:48:38 UTC
I started investigating this myself but I think it makes more sense to throw this back your direction: Given that you have USE_PYTHON=pep517, are ${PY_SETUPTOOLS} and py-wheel really required in BUILD_DEPENDS?
Comment 11 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-22 18:13:00 UTC
Submitter, any news on this?
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-10-30 14:16:20 UTC
A commit in branch main references this bug:

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

commit db51a0e68e0021198ae21c1c7de9b5b03d346108
Author:     Martin Neubauer <m.ne@gmx.net>
AuthorDate: 2023-10-04 11:18:20 +0000
Commit:     Joel Bodenmann <jbo@FreeBSD.org>
CommitDate: 2023-10-30 14:14:50 +0000

    www/offpunk: Add new port

    Offline-first gemini/web/gopher/rss reader and browser.

    PR:                     273554
    Approved by:            zirias (mentor)
    Differential Revision:  https://reviews.freebsd.org/D42071

 www/Makefile                |  1 +
 www/offpunk/Makefile (new)  | 42 ++++++++++++++++++++++++++++++++++++++++++
 www/offpunk/distinfo (new)  |  3 +++
 www/offpunk/pkg-descr (new) |  5 +++++
 4 files changed, 51 insertions(+)
Comment 13 Joel Bodenmann freebsd_committer freebsd_triage 2023-10-30 14:16:30 UTC
Committed - thanks! :)