Bug 269748 - New port: net/xapsd: iOS push notifications daemon for dovecot
Summary: New port: net/xapsd: iOS push notifications daemon for dovecot
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: Robert Clausecker
URL: https://github.com/freswa/dovecot-xap...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-21 22:45 UTC by Henry
Modified: 2023-02-27 22:54 UTC (History)
2 users (show)

See Also:


Attachments
patch (10.40 KB, patch)
2023-02-21 22:45 UTC, Henry
PopularMoment: maintainer-approval+
Details | Diff
patch (10.37 KB, patch)
2023-02-21 23:09 UTC, Henry
no flags Details | Diff
patch (10.07 KB, patch)
2023-02-21 23:19 UTC, Henry
no flags Details | Diff
patch (10.53 KB, patch)
2023-02-24 17:41 UTC, Henry
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry 2023-02-21 22:45:32 UTC
Created attachment 240312 [details]
patch

net/xapsd: New port: iOS push notifications daemon for dovecot
Comment 1 Henry 2023-02-21 23:09:47 UTC
Created attachment 240313 [details]
patch

update patch
Comment 2 Henry 2023-02-21 23:19:07 UTC
Created attachment 240314 [details]
patch

white space clean up
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2023-02-24 09:36:48 UTC
Greetings!

Here's some quick Q/A feedback:

 - use DISTVERSION instead of PORTVERSION unless DISTVERSION gives a wrong result
 - when building from a raw git commit with no upstream versions, use a version
   number like gYYYYMMDD.  You almost did that, but forgot the g prefix.  See
   ยง 5.2.3 Porter's Handbook for guidance.
 - is there a reason why v1.0 could not be used?
 - is there a reason why you weren't able to use the GO_MODULE mechanism?  If
   it's because of the version number, you can generate the correct fake Go
   version for an arbitrary git commit using

       go list -m -f '{{.Version}}' package@githash
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-02-24 09:37:20 UTC
Please also edit pkg-descr to hold at least three lines of text as per policy.
Comment 5 Henry 2023-02-24 17:41:54 UTC
Created attachment 240383 [details]
patch

Thank you for your feedback.

I've made the following changes to the proposed patch:

1. switched to using DISTVERSION
2. updated the version string with the g prefix
3. added further lines to pkg-desc
4. ameliorated COMMENT warnings from portlint
5. added xapsd to the parent net Makefile

The reason to use the tag is because v1.0 is almost 2 years old, and many improvements have been made since, including critically the ability to specify which IP address the daemon binds to.

Using a tag seems to prevent using the GO_MODULE mechanism afaict.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-02-24 20:07:04 UTC
(In reply to Henry from comment #5)

Thank you for the update.

> Using a tag seems to prevent using the GO_MODULE mechanism afaict.

You can type

    go list -m -f '{{.Version}}' github.com/freswa/dovecot-xaps-daemon@e579559

This gives

    v0.0.0-20230220214250-e5795599302a

which is the version of the module as the go command understands it.

You can then set

    DISTVERSION=	${MODVERSION:S/-/./g:R}
    DISTVERSIONPREFIX=	v
    MODVERSION=	v0.0.0-20230220214250-e5795599302a
    GO_MODULE=	github.com/freswa/dovecot-xaps-daemon@v${MODVERSION}

and it should work (didn't check though).  I've done a similar things in devel/go-perf.

Neverthless, I'll go ahead and see if I can get the port committed as per attachment #240383 [details].
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-02-27 22:50:21 UTC
A commit in branch main references this bug:

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

commit 48a5ea0ff025ec13a17e6d299829c7e4f9e388ae
Author:     Henry <PopularMoment@protonmail.com>
AuthorDate: 2023-02-21 18:59:48 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-02-27 22:48:03 +0000

    net/xapsd: New port: Apple push notifications daemon for dovecot

    Apple push notification daemon for dovecot.

    Together with dovecot-xaps-plugin, this will enable push email
    for iOS devices that talk to your dovecot IMAP server.

    WWW: https://github.com/freswa/dovecot-xaps-daemon

    Submitter becomes maintainer.  Is already maintainer of other ports.

    PR:             269748
    Approved by:    flo (mentor)
    Differential Revision: https://reviews.freebsd.org/D38779

 GIDs                           |  2 +-
 UIDs                           |  2 +-
 net/Makefile                   |  1 +
 net/xapsd/Makefile (new)       | 50 +++++++++++++++++++++++++++++++++++++
 net/xapsd/distinfo (new)       | 45 +++++++++++++++++++++++++++++++++
 net/xapsd/files/xapsd.in (new) | 56 ++++++++++++++++++++++++++++++++++++++++++
 net/xapsd/pkg-descr (new)      |  4 +++
 net/xapsd/pkg-message (new)    | 13 ++++++++++
 net/xapsd/pkg-plist (new)      |  2 ++
 9 files changed, 173 insertions(+), 2 deletions(-)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-02-27 22:54:19 UTC
Thank you for your contribution.