Bug 273002 - mai/postsrsd: maintainer update
Summary: mai/postsrsd: maintainer update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Robert Clausecker
URL: https://github.com/roehling/postsrsd/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-07 20:07 UTC by Krzysztof
Modified: 2023-09-04 19:31 UTC (History)
2 users (show)

See Also:


Attachments
poudriere testport log (39.25 KB, text/plain)
2023-08-07 20:07 UTC, Krzysztof
no flags Details
patch to update the port (15.11 KB, patch)
2023-08-07 20:08 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
update patch (16.87 KB, patch)
2023-09-02 08:29 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
poudriere testport log (33.48 KB, text/plain)
2023-09-02 08:30 UTC, Krzysztof
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof 2023-08-07 20:07:54 UTC
Created attachment 243944 [details]
poudriere testport log

There is new version of mail/postsrsd. I've made a patch which updates postsrsd. Also author of postrssd added support for sqlite, milter and redis. Unfortunatelly I'm not able (for now) add support for milter and sqlite: I have had errors with patching CMakeList.txt.

I hope that missing options will be added. Maybe someone will be more brilliant than me with configuring cmake :-)))

Changes where tested with poudriere - I'm attaching logifile from poudriere.
Comment 1 Krzysztof 2023-08-07 20:08:33 UTC
Created attachment 243945 [details]
patch to update the port

And diff from git
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-08-08 08:49:38 UTC
I'll switch to DISTVERSION on commit as per policy.

One thing I noticed is that you have configured the port to install a secrets file.  This file will be the same for all users who download the package.  Are you sure this is correct?  You may need to generate this file in a post-install script or similar.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-08-09 13:05:35 UTC
A commit in branch main references this bug:

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

commit 06c06ad9fa8d2594adf5a5fe7120c623c48dd90a
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2023-08-08 08:46:41 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-08-09 13:01:35 +0000

    mail/postsrsd: update to 2.0.6

    Changelog: https://github.com/roehling/postsrsd/releases/tag/2.0.6

    PR:             273002

 mail/postsrsd/Makefile                             |  32 +++--
 mail/postsrsd/distinfo                             |   6 +-
 mail/postsrsd/files/patch-CMakeLists.txt           | 144 ++++++++++-----------
 .../files/patch-postinstall.cmake.in (gone)        |  69 ----------
 mail/postsrsd/files/patch-src_config.c (new)       |  10 ++
 mail/postsrsd/files/patch-src_milter.c (new)       |  10 ++
 mail/postsrsd/files/patch-src_srs.c (new)          |  10 ++
 mail/postsrsd/files/patch-src_srs2.c (new)         |  10 ++
 mail/postsrsd/files/patch-src_util.c (new)         |  10 ++
 9 files changed, 142 insertions(+), 159 deletions(-)
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-08-09 13:14:29 UTC
Thank you for your contribution.
Please review the use of the secrets file and submit an update if it is not appropiate to ship it.
Comment 5 Krzysztof 2023-08-09 18:18:09 UTC
(In reply to Robert Clausecker from comment #2)
About postsrsd.secret: probably you are right, but this task is done by cmake. As I understand generetion of secret should be "repeated/moved" to post-install step.

I'll check it.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-08-09 18:41:11 UTC
(In reply to Krzysztof from comment #5)

Yes, a post-install script seems like an appropriate solution.
Comment 7 Peter Putzer 2023-08-11 20:40:09 UTC
Unfortunately the /usr/local/etc/rc.d/postsrsd script does not work with postsrsd 2.x as several command line options were dropped in favor of a config file. As is, the port is broken.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-08-11 22:31:40 UTC
Dear maintainer, would you like me to revert this update so the port continues to work?  You can then submit another update at any time.  Or if you are quick, just post a patch to fix the scripts.
Comment 9 Peter Putzer 2023-08-12 07:27:23 UTC
I can't comment for Krzysztof, but a revert would probably be best at this point. There needs to be a proper default configuration file as well (or a mechanism for creating a config file dynamically from rc.conf). 

Also, while the port builds, I am not sure 2.0.6 it is working correctly on FreeBSD. I have not been able to get the socketmap to work (to reduce complexity, I did not try the redis backend, just the default embedded envelope).
Comment 10 Krzysztof 2023-08-13 06:43:24 UTC
(In reply to Robert Clausecker from comment #8)

OK.

Let's revert. Meantime author of postsrsd made a new version which should support sqlite3 also.

So I will make a new patch with correct starting options (well: they shoud be removed).

postsrsd 2.x is new branch of postsrsd. The 1.x branch was updated a year ago and (I think) will not be continued.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-08-13 09:42:40 UTC
A commit in branch main references this bug:

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

commit ccf1c3fca8ca648b1fd8b117f449873e29d0ed0b
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-08-13 09:28:35 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-08-13 09:35:34 +0000

    mail/postsrsd: revert update to 2.0.6

    This reverts commit 06c06ad9fa8d2594adf5a5fe7120c623c48dd90a.

    Unfortunately the /usr/local/etc/rc.d/postsrsd script does not work with
    postsrsd 2.x as several command line options were dropped in favor of a
    config file.  Revert the update until a solution is found.

    PR:             273002
    Reported by:    Peter Putzer <freebsd@mnd.sc>

 mail/postsrsd/Makefile                             |  33 ++---
 mail/postsrsd/distinfo                             |   6 +-
 mail/postsrsd/files/patch-CMakeLists.txt           | 144 +++++++++++----------
 .../files/patch-postinstall.cmake.in (new)         |  69 ++++++++++
 mail/postsrsd/files/patch-src_config.c (gone)      |  10 --
 mail/postsrsd/files/patch-src_milter.c (gone)      |  10 --
 mail/postsrsd/files/patch-src_srs.c (gone)         |  10 --
 mail/postsrsd/files/patch-src_srs2.c (gone)        |  10 --
 mail/postsrsd/files/patch-src_util.c (gone)        |  10 --
 9 files changed, 160 insertions(+), 142 deletions(-)
Comment 12 Robert Clausecker freebsd_committer freebsd_triage 2023-08-13 09:50:44 UTC
Thank you for your contribution.
Comment 13 Krzysztof 2023-09-02 08:28:41 UTC
I'm re opening this bug as new version (2.0.8) has been released. Also I've made review of patch which covers:
* support for sqlite3
* support for redis (it was included in previous patch)
* disable installing postsrsd.secret - it is generated during first start of postsrsd (startup script)
* add pkg-message which informs about changes in configuration
* some cleanup suggested by portlint

Port was tested with poudriere so new logfile and new patch will attached.
Comment 14 Krzysztof 2023-09-02 08:29:45 UTC
Created attachment 244580 [details]
update patch

new patch
Comment 15 Krzysztof 2023-09-02 08:30:15 UTC
Created attachment 244581 [details]
poudriere testport log

logfile from poudriere
Comment 16 Robert Clausecker freebsd_committer freebsd_triage 2023-09-02 10:58:03 UTC
Please open a new issue for a new port update do not reopen old issues to tack more work onto them.

I will not process any of the patches you have added to this issue.
Comment 17 Krzysztof 2023-09-04 19:31:47 UTC
(In reply to Robert Clausecker from comment #16)
OK, I will remember. I didn't want to multiply bugs :-)))