Bug 271401 - [PATCH] net/jwhois: Update to 4.0.73, take maintainership
Summary: [PATCH] net/jwhois: Update to 4.0.73, take maintainership
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-13 23:26 UTC by Terry Kennedy
Modified: 2023-05-15 23:58 UTC (History)
3 users (show)

See Also:


Attachments
Patch to update jwhois to 4.0.73 (95.94 KB, patch)
2023-05-13 23:26 UTC, Terry Kennedy
no flags Details | Diff
Email from maintainer stating project is moribund (2.42 KB, text/plain)
2023-05-13 23:27 UTC, Terry Kennedy
no flags Details
revised-patch (114.60 KB, application/mbox)
2023-05-15 04:33 UTC, Koichiro Iwao
no flags Details
revised-patch-2 (113.45 KB, patch)
2023-05-15 09:43 UTC, Koichiro Iwao
no flags Details | Diff
revised-patch-3 (34.58 KB, patch)
2023-05-15 09:47 UTC, Koichiro Iwao
no flags Details | Diff
Update pkg-descr to include info on source and version (368 bytes, patch)
2023-05-15 23:41 UTC, Terry Kennedy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Kennedy 2023-05-13 23:26:40 UTC
Created attachment 242153 [details]
Patch to update jwhois to 4.0.73

Upstream jwhois is moribund for > 10 years (see maintainer-email.txt attachment in subsequent comment).

Fedora has been maintaining a branch at https://kojipkgs.fedoraproject.org//packages/jwhois/4.0/73.fc38/src which contains many additional patches and brings the port to 4.0.73.

The attached diff brings these fixes to FreeBSD, takes maintainership, and fixes a typo in pkg-descr.
Comment 1 Terry Kennedy 2023-05-13 23:27:36 UTC
Created attachment 242154 [details]
Email from maintainer stating project is moribund
Comment 2 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 04:32:30 UTC
4.0.73 is not a jwhois version and jwhois version is still 4.0. 73 is Fedora's package revision so "Update to jwhois to 4.0.73" is not correct. 

Please don't jump PORTREVISION from 7 to 73. Even if we apply the same patches as Fedora's revision 73, our version must be incremented.

I would suggest you use PATCH_SITES and PATCHFILES to record where patches come from.
Comment 3 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 04:33:54 UTC
Created attachment 242179 [details]
revised-patch

What do you think of my revised patch?
Comment 4 Terry Kennedy 2023-05-15 06:17:28 UTC
(In reply to Koichiro Iwao from comment #3)

The patch looks good, with the exception of a few minor things described below. I agree that it is much better to fetch the patches from the Fedora repository rather than having a monolithic patchfile as part of the port.

The SUB_LIST doesn't seem to be correct - we end up with "/usr/local/lynx" instead of the expected "/usr/local/bin/lynx". Also, do you think we should list lynx as a dependency (or at least an OPTION)?

Is there any way to fetch the jwhois.conf file from Fedora instead of including it in the port's files subdirectory? That file is one of the major fixes and fetching it from Fedora should make it easier to track future changes.

I understand what you're saying about PORTREVISION=, but we should have some way of noting the Fedora jwhois release the port is based on. If we're going to bundle jwhois.conf.in in the files subdirectory, perhaps edit it to indicate the Fedora jwhois RPM version it was derived from?

Thanks for your work to improve my submission.
Comment 5 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 06:39:50 UTC
(In reply to Terry Kennedy from comment #4)
Thanks for pointing out wrong path for lynx. That's my careless mistake.
Regrding jwhois.conf, it is possible. Please wait for a while until I create updated patch.
Comment 6 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 09:43:16 UTC
Created attachment 242186 [details]
revised-patch-2

Here's an updated patch. 

It is a little bit hacky but now the port fetches Fedora's SRPM and applies patches included in SRPM. Also, jwhois.conf is installed from SRPM.

> I understand what you're saying about PORTREVISION=, but we should have some way of noting the Fedora jwhois release the port is based on. If we're going to bundle jwhois.conf.in in the files subdirectory, perhaps edit it to indicate the Fedora jwhois RPM version it was derived from?

What about noting pk in pkg-descr or COMMENT? Then we can know jwhois RPM version based on in `pkg info jwhois`.
Comment 7 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 09:47:10 UTC
Created attachment 242187 [details]
revised-patch-3

Oops, the patch is not the correct one. This is I intended to attach.
Comment 8 Terry Kennedy 2023-05-15 23:41:25 UTC
Created attachment 242201 [details]
Update pkg-descr to include info on source and version

Your patch looks fine to me.

Since we're already near the length limit in COMMENT=, I opted to put the source and version in pkg-descr.
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-05-15 23:56:05 UTC
A commit in branch main references this bug:

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

commit 546af61fa720b0d4eff77ac6dd395cb504866e6b
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-05-15 04:19:11 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-05-15 23:54:16 +0000

    net/jwhois: import Fedora patches & pass to maintainer

    While here, use subst rather than using hardcoded path for lynx,
    tiny cleanups.

    PR:             271401
    Reviewed by:    meta (myself, revised submitter's patch)

 net/jwhois/Makefile                 |   32 +-
 net/jwhois/distinfo                 |    3 +
 net/jwhois/files/jwhois.conf (gone) | 1004 -----------------------------------
 net/jwhois/pkg-descr                |    2 +
 4 files changed, 27 insertions(+), 1014 deletions(-)
Comment 10 Koichiro Iwao freebsd_committer freebsd_triage 2023-05-15 23:58:18 UTC
Committed, thanks! Feel free to add me to the CC list when you submit an update. Then I can pick your patch up.