Bug 278707 - [NEW PORT] net-im/py-apprise: Push Notifications that work with just about every platform!
Summary: [NEW PORT] net-im/py-apprise: Push Notifications that work with just about ev...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Zsolt Udvari
URL:
Keywords:
: 266074 (view as bug list)
Depends on: 279240
Blocks: 277626
  Show dependency treegraph
 
Reported: 2024-05-03 04:44 UTC by Nicholas Kirby
Modified: 2024-05-23 12:26 UTC (History)
3 users (show)

See Also:


Attachments
New port py-apprise 1.7.6 (1.55 KB, patch)
2024-05-03 04:44 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.7.6 v2 (3.25 KB, patch)
2024-05-03 04:54 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log (61.09 KB, text/plain)
2024-05-03 04:55 UTC, Nicholas Kirby
no flags Details
New port py-apprise 1.7.6 v3 (1.46 KB, patch)
2024-05-03 04:59 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.7.6 v4 (1.52 KB, patch)
2024-05-03 05:18 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.7.6 v5 (1.74 KB, patch)
2024-05-03 05:29 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log for v5 (65.42 KB, text/plain)
2024-05-03 05:29 UTC, Nicholas Kirby
no flags Details
New port py-apprise 1.7.6 v6 (1.81 KB, patch)
2024-05-03 05:42 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.7.6 v7 (1.81 KB, patch)
2024-05-05 03:29 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log for v7 (65.72 KB, text/plain)
2024-05-05 03:30 UTC, Nicholas Kirby
no flags Details
New port py-apprise 1.7.6 v8 (2.20 KB, patch)
2024-05-09 03:25 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.7.6 v9 (2.20 KB, patch)
2024-05-15 00:03 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.8.0 (2.81 KB, patch)
2024-05-17 03:43 UTC, Nicholas Kirby
no flags Details | Diff
Poudriere build log for 1.8.0 (63.96 KB, text/plain)
2024-05-17 03:44 UTC, Nicholas Kirby
no flags Details
New port py-apprise 1.8.0 v2 (2.41 KB, patch)
2024-05-23 07:01 UTC, Nicholas Kirby
no flags Details | Diff
New port py-apprise 1.8.0 v3 (2.41 KB, patch)
2024-05-23 12:26 UTC, Nicholas Kirby
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Kirby 2024-05-03 04:44:42 UTC
Created attachment 250339 [details]
New port py-apprise 1.7.6

Good evening,

The upcoming build of news/sabnzbd (4.3.0) requires an additional python module, apprise, to build and run so I thought I'd submit a port in preparation for this as I did not see one available. 

Please review my work and let me know if there's anything I should correct. I'm very new to porting work so please be thorough.

Thanks,
Nick
Comment 1 Nicholas Kirby 2024-05-03 04:54:44 UTC
Created attachment 250340 [details]
New port py-apprise 1.7.6 v2

I left some garbage in the Makefile that didn't need to be there to the best of my knowledge. Fixed.
Comment 2 Nicholas Kirby 2024-05-03 04:55:15 UTC
Created attachment 250341 [details]
Poudriere build log

Build log from poudriere attached
Comment 3 Nicholas Kirby 2024-05-03 04:59:42 UTC
Created attachment 250342 [details]
New port py-apprise 1.7.6 v3

This time how about I READ the file before I upload it, hm?
Comment 4 Nicholas Kirby 2024-05-03 05:18:15 UTC
Created attachment 250343 [details]
New port py-apprise 1.7.6 v4

Small change to Makefile as yaml is a apprise requirement and not a sabnzbd requirement.
Comment 5 Nicholas Kirby 2024-05-03 05:29:23 UTC
Created attachment 250344 [details]
New port py-apprise 1.7.6 v5

Added modules from requirements.txt for apprise
Comment 6 Nicholas Kirby 2024-05-03 05:29:47 UTC
Created attachment 250345 [details]
Poudriere build log for v5
Comment 7 Nicholas Kirby 2024-05-03 05:42:00 UTC
Created attachment 250346 [details]
New port py-apprise 1.7.6 v6

Add py-paho-mqtt listed in sabnzbd requirements for py-apprise, but not listed in apprise requirements.txt.

How should this be handled? As an option? In the sabnzbd Makefile? Or is it fine since py-apprise is new and only going to be required by sabnzbd 4.3.0?
Comment 8 Nicholas Kirby 2024-05-05 03:29:31 UTC
Created attachment 250409 [details]
New port py-apprise 1.7.6 v7

Update to Makefile and pkg-desc with reccomendations from 'portlint -A', 'portfmt -D Makefile' and 'portclippy Makefile'

Thanks
Comment 9 Nicholas Kirby 2024-05-05 03:30:04 UTC
Created attachment 250410 [details]
Poudriere build log for v7
Comment 10 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-08 17:18:55 UTC
I think this software isn't 'news', see https://docs.freebsd.org/en/books/porters-handbook/book/#porting-categories
Maybe better choice is "net-im".

And should add the new port entry into net-im/Makefile.
Comment 11 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-08 17:25:24 UTC
Another suggestions:
COMMENT: get it from project page (eg. from "About"). It is independent from sabnzbd.
PORTVERSION: use DISTVERSION instead (https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-versions)
Comment 12 Nicholas Kirby 2024-05-09 03:25:58 UTC
Created attachment 250538 [details]
New port py-apprise 1.7.6 v8

Updated with Zsolt's recommendations.
Comment 13 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-10 17:59:11 UTC
*** Bug 266074 has been marked as a duplicate of this bug. ***
Comment 14 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-12 18:03:18 UTC
https://reviews.freebsd.org/D45169
Comment 15 Nicholas Kirby 2024-05-15 00:03:50 UTC
Created attachment 250662 [details]
New port py-apprise 1.7.6 v9

Somehow lost the PyYAML dependency in the shuffle. Readded.
Comment 16 Matt 2024-05-17 02:09:20 UTC
I'm not a porting expert, but I think RUN depends (python requirements.txt) need to be installed for the port to run correctly and BUILD depends (python dev-requirements.txt) are what are required to run the build.

I think that ports are supposed to follow upstream options, so options will need to be defined for the plugins mqtt, fcm, simplepush and growl (these are the only plugins that require additional dependencies). Because py-paho-mqtt is optional for this port it will need to be added to the sabnzbd run depends, since it is required for that port.

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}markdown>0:textproc/py-markdown@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}requests-oauthlib>0:www/py-requests-oauthlib@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml@${PY_FLAVOR}

BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Babel>=0:devel/py-babel@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}

OPTIONS_DEFINE=	MQTT FCM SIMPLEPUSH GROWL
MQTT_DESC=	A wrapper for MQTT Notifications
MQTT_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}paho-mqtt>0:net/py-paho-mqtt@${PY_FLAVOR}
FCM_DESC=	A wrapper for Google's Firebase Cloud Messaging Notifications
FCM_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR}
SIMPLEPUSH_DESC=	A wrapper for SimplePush Notifications
SIMPLEPUSH_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR}
GROWL_DESC=	A wrapper for Growl Notifications
GROWL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}gntp>0:net/py-gntp@${PY_FLAVOR}
Comment 17 Nicholas Kirby 2024-05-17 03:43:44 UTC
Created attachment 250711 [details]
New port py-apprise 1.8.0

When you are right, you are right.

I've added your suggestions Matt and updated to 1.8.0 besides.

Thanks for helping make the best port available!

Zsolt, should the phabricator be updated, or since it shares the same bones as this one will it be fine?
Comment 18 Nicholas Kirby 2024-05-17 03:44:36 UTC
Created attachment 250712 [details]
Poudriere build log for 1.8.0
Comment 19 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-17 17:45:09 UTC
(In reply to Nicholas Kirby from comment #17)
The optional dependencies are small so I think doesn't need introduce options - instead should add them as runtime dependencies. So the user install it from repository and can use it in every case (oob).
Comment 20 Nicholas Kirby 2024-05-23 07:01:05 UTC
Created attachment 250891 [details]
New port py-apprise 1.8.0 v2

diff updated/corrected to be in line with Zsolt's reccomendations.

Added a depends on py-paho-mqtt being updated to 2.1.0 because that should fix the functionality issue that has been keeping this port on hold.

To be clear, requirements for py-apprise on the guthub still have py-paho-mqtt set at 1.6.1, but the changes to 2.1.0 should allow it to work with the newer version regardless as it will assume v1 API calls by default.

Thanks again
Comment 21 Nicholas Kirby 2024-05-23 12:26:20 UTC
Created attachment 250897 [details]
New port py-apprise 1.8.0 v3

Put babel back as a build dep, not a run dep.