Bug 285012 - [new port] net/py-tlsrpt-reporter: Collectd, fetcher and reportd software for SMTP TLS reporting
Summary: [new port] net/py-tlsrpt-reporter: Collectd, fetcher and reportd software for...
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:
Keywords:
Depends on: 284992 287297
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-24 12:16 UTC by Yusuf Yaman
Modified: 2025-06-10 15:31 UTC (History)
3 users (show)

See Also:


Attachments
net/py-tlsrpt-reporter.patch (4.33 KB, patch)
2025-02-24 12:19 UTC, Yusuf Yaman
no flags Details | Diff
net/py-tlsrpt-reporter.patch: WIP (6.98 KB, patch)
2025-02-24 13:58 UTC, Yusuf Yaman
no flags Details | Diff
net/py-tlsrpt-reporter.patch: WIP (6.98 KB, patch)
2025-02-24 14:22 UTC, Yusuf Yaman
no flags Details | Diff
net/py-tlsrpt-reporter.patch (5.69 KB, patch)
2025-02-25 11:56 UTC, Yusuf Yaman
no flags Details | Diff
Add new port for mail/py-tlsrpt-reporter (11.58 KB, patch)
2025-06-04 14:07 UTC, Matthew Seaman
matthew: maintainer-approval? (nxjoseph)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2025-02-24 12:16:02 UTC

    
Comment 1 Yusuf Yaman 2025-02-24 12:19:57 UTC
Created attachment 257838 [details]
net/py-tlsrpt-reporter.patch

tlsrpt-reporter is a TLSRPT reporting service for SMTP TLS Reporting as defined
in RFC 8460. It receives TLSRPT datagrams from a MTA, collects them, creates
a report in conformance with the TLSRPT Reporting Schema and finally delivers
the report either via SMTP, indirectly by submitting it to a local MTA which
ultimately will be responsible for delivering the report
or directly via HTTP POST.

WWW:	https://github.com/sys4/tlsrpt-reporter

Poudriere testport passes on 142amd64-default.

Pet port{clippy,fmt,lint}.

The PR in "depends on" field is exist because the entry to net/Makefile for this port is added while there is bug #284992 entry was there in net/Makefile. You may ignore it if you'd like to handle entries in net/Makefile.

I'd like to know if this port works for you.

Thanks in advance.
Comment 2 Yusuf Yaman 2025-02-24 12:24:38 UTC
I'd like to add more things like TESTS and tools/benchmarks to the port.
Comment 3 Yusuf Yaman 2025-02-24 13:57:55 UTC
I've successfully added DOCS and TESTS option but having hard time trying to fix an error in TOOLS option. I don't know why it fails and i am unable to find much information about dbgnumber error.

gmake[1]: Entering directory '/wrkdirs/usr/ports/net/py-tlsrpt-reporter/work-py311/tlsrpt-reporter-0.5.0/tools/benchmark'
c++ -O2 -pipe  -L/usr/local/lib -Wno-error=unused-but-set-variable -Werror -fstack-protector-strong -fno-strict-aliasing   -std=c++11  -O2 -pipe  -L/usr/local/lib -Wno-error=unused-but-set-variable -Werror -fstack-protector-strong -fno-strict-aliasing  -Wall -I /usr/local/include -g -O2 -pthread -fpermissive   -fstack-protector-strong  -Wall -g -pthread -lboost_program_options  bench.cc /usr/local/lib/libtlsrpt.a /lib/libthr.so.3  /usr/local/lib/libtlsrpt.a /lib/libthr.so.3 -o bench
c++ -O2 -pipe  -L/usr/local/lib -Wno-error=unused-but-set-variable -Werror -fstack-protector-strong -fno-strict-aliasing   -std=c++11  -O2 -pipe  -L/usr/local/lib -Wno-error=unused-but-set-variable -Werror -fstack-protector-strong -fno-strict-aliasing  -Wall -I /usr/local/include -g -O2 -pthread -fpermissive   -fstack-protector-strong  -Wall -g -pthread -lboost_program_options  bench1.cc /usr/local/lib/libtlsrpt.a /lib/libthr.so.3  /usr/local/lib/libtlsrpt.a /lib/libthr.so.3 -o bench1
bench1.cc:67:7: warning: variable 'donetotal' set but not used [-Wunused-but-set-variable]
   67 |   int donetotal=0;
      |       ^
bench1.cc:68:7: warning: variable 'donepart' set but not used [-Wunused-but-set-variable]
   68 |   int donepart=0;
      |       ^
bench1.cc:69:7: warning: variable 'parts' set but not used [-Wunused-but-set-variable]
   69 |   int parts=0;
      |       ^
3 warnings generated.
ld: error: undefined symbol: dbgnumber
>>> referenced by bench1.cc:75
>>>               /tmp/bench1-3f1149.o:(main)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [<builtin>: bench1] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/py-tlsrpt-reporter/work-py311/tlsrpt-reporter-0.5.0/tools/benchmark'
*** Error code 2

Stop.
make: stopped in /usr/ports/net/py-tlsrpt-reporter
Comment 4 Yusuf Yaman 2025-02-24 13:58:56 UTC
Created attachment 257840 [details]
net/py-tlsrpt-reporter.patch: WIP
Comment 5 Yusuf Yaman 2025-02-24 14:22:45 UTC
Created attachment 257841 [details]
net/py-tlsrpt-reporter.patch: WIP

Pet port tools
Comment 6 Yusuf Yaman 2025-02-25 11:55:38 UTC
(In reply to Yusuf Yaman from comment #2)
I added DOCS (manpages of tlsrpt-reporter tools) and TESTS but not TOOLS because upstream contributor said that TOOLS should not be included in default install. Poudriere testport is OK on 142amd64-default, I also petted port{clippy,fmt,lint}.

See the comment: 
https://github.com/sys4/tlsrpt-reporter/issues/44#issuecomment-2680292473
Comment 7 Yusuf Yaman 2025-02-25 11:56:06 UTC
Created attachment 257915 [details]
net/py-tlsrpt-reporter.patch

Latest patch. Everything is fine.
Comment 8 Joseph Mingrone freebsd_committer freebsd_triage 2025-05-14 19:51:01 UTC
The patch doesn't apply against the current ports tree.  Could you rebase and update it?  Also, it probably makes sense to have this in mail/ rather than net/.
Comment 9 Matthew Seaman freebsd_committer freebsd_triage 2025-05-14 20:08:31 UTC
Thank you for your submission.  I have a few comments:

* This should be in category 'mail' since it's all about SMTP over TLS.

* It's not usual to install tests, or even to have an option to do so.
  Generally the idea is to be able to run them from the port directory
  via `make test` You probably want `USE_PYTHON += unittest`

* `USES python:3.7+` is redundant -- the earliest version of python in the ports
  is 3.8, so this should be just `USES python`
 
I'll work on this tomorrow.
Comment 10 Matthew Seaman freebsd_committer freebsd_triage 2025-06-04 14:07:16 UTC
Created attachment 260969 [details]
Add new port for mail/py-tlsrpt-reporter

I largely rewrote the proposed new port to correct a number of deficiencies:

  * Make the primary category 'mail' 
  * Install a sample configuration file
  * Add rc scripts to start the python daemon processes
  * Enable `make test` using unittest -- tests will run from the staging directory 
  * Build and install man pages
  * Eliminate options for installing man pages and test -- man pages should always 
    be installed, and tests should not
  * Use a _tlsrpt UID and GID rather than running with unnecessary root privileges

Please let me know if you still want to maintain this port, and that you approve my changes.  If not, I'll happilly take on this port myself. I'm sorry it as taken so long to process your original bug report.
Comment 11 Yusuf Yaman 2025-06-04 16:47:28 UTC
(In reply to Matthew Seaman from comment #10)
Hi, I went to another city for holiday, so, I am far away from my computer and therefore I don't want to maintain this port and you can take it. I don't have that much information about mail programs already. Thanks for your work!
Comment 12 Matthew Seaman freebsd_committer freebsd_triage 2025-06-04 17:43:45 UTC
(In reply to Yusuf Yaman from comment #11)

Great.  I shall take over the port.  Thank you very much for your contribution.
Comment 13 commit-hook freebsd_committer freebsd_triage 2025-06-04 17:48:47 UTC
A commit in branch main references this bug:

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

commit 08bdfa4c8627a471146ed481ff340ecc9257a517
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2025-06-04 17:47:11 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2025-06-04 17:48:20 +0000

    mail/py-tlsrpt-reporter: new port

    tlsrpt-reporter is a TLSRPT reporting service for SMTP TLS Reporting
    as defined in RFC 8460. It receives TLSRPT datagrams from a MTA,
    collects them, creates a report in conformance with the TLSRPT
    Reporting Schema and finally delivers the report either via SMTP,
    indirectly by submitting it to a local MTA which ultimately will be
    responsible for delivering the report, or directly via HTTP POST.

    PR:     285012
    Reported by:    Yusuf Yaman

 GIDs                                               |  2 +-
 UIDs                                               |  2 +-
 mail/Makefile                                      |  1 +
 mail/py-tlsrpt-reporter/Makefile (new)             | 63 +++++++++++++++++
 mail/py-tlsrpt-reporter/distinfo (new)             |  3 +
 .../files/tlsrpt-collectd.in (new)                 | 76 +++++++++++++++++++++
 .../files/tlsrpt-reportd.in (new)                  | 78 ++++++++++++++++++++++
 .../files/tlsrpt-reporter.cfg.in (new)             | 32 +++++++++
 mail/py-tlsrpt-reporter/pkg-descr (new)            |  6 ++
 9 files changed, 261 insertions(+), 2 deletions(-)
Comment 14 Matthew Seaman freebsd_committer freebsd_triage 2025-06-04 17:52:06 UTC
Just waiting for 287297 before closing.