Bug 280379 - devel/pmd: update to version 7.3.0 and take maintainership
Summary: devel/pmd: update to version 7.3.0 and 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: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-19 23:01 UTC by gatekeeper
Modified: 2024-07-24 12:33 UTC (History)
1 user (show)

See Also:


Attachments
git patch (12.55 KB, patch)
2024-07-19 23:01 UTC, gatekeeper
no flags Details | Diff
git patch (10.83 KB, patch)
2024-07-19 23:28 UTC, gatekeeper
no flags Details | Diff
git patch (10.82 KB, patch)
2024-07-19 23:34 UTC, gatekeeper
no flags Details | Diff
git patch (9.26 KB, patch)
2024-07-20 00:47 UTC, gatekeeper
no flags Details | Diff
v2 (9.71 KB, patch)
2024-07-21 02:40 UTC, Vladimir Druzenko
no flags Details | Diff
v3 (9.68 KB, patch)
2024-07-21 03:10 UTC, Vladimir Druzenko
no flags Details | Diff
git patch (10.23 KB, patch)
2024-07-21 20:05 UTC, gatekeeper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gatekeeper 2024-07-19 23:01:22 UTC
Created attachment 252181 [details]
git patch

Hi. I have updated pmd to version 7.3.0 and propose to take maintainership (see git patch). Poudriere runs fine for the latest three releases (13.3, 14.0, and 14.1).
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-19 23:19:03 UTC
Why "%%DATADIR%%-%%PORTVERSION%%" instead of "%%DATADIR%%"?

Look like bin/pmd require bash for run:
local script_real_loc=${BASH_SOURCE[0]:-${(%):-%x}}
Comment 2 gatekeeper 2024-07-19 23:28:15 UTC
Created attachment 252182 [details]
git patch

Thanks for the quick reply.

You are right, it should be "%%DATADIR%% and not "%%DATADIR%%-%%PORTVERSION%% - fixed.

bin/pmd requires BASH - yes, silly me - added RUN_DEPENDS clause

Hopefully now all is well :-)
Comment 3 gatekeeper 2024-07-19 23:34:01 UTC
Created attachment 252183 [details]
git patch

portfmt, portclippy, and portlint - all clear
poudriere - ok for 13.3, 14.0 and 14.1
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-19 23:56:33 UTC
1.
MASTER_SITES=	https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.3.0/
Maybe this work too:
MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTNAME}_releases/${DISTVERSION}/

Or even without MASTER_SITES and DISTNAME, but this:
DISTVERSIONPREFIX=dist-
DISTVERSIONSUFFIX=-bin
USE_GITHUB=yes

2.
Install *.jar files in /usr/local/share/java/${PORTNAME}:
DATADIR=	${JAVASHAREDIR}/${PORTNAME}
${INSTALL_DATA} ${WRKSRC}/lib/* ${STAGEDIR}${DATADIR}
Like was in old Makefile.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-20 00:16:01 UTC
If you don't succeed, I'll try to do it tomorrow.
Comment 6 gatekeeper 2024-07-20 00:19:22 UTC
(In reply to Vladimir Druzenko from comment #5)

Thanks for the quick reply :-)

I can get it working with MASTER_SITES, but not with the 2nd option.

What I am thinking about is the lib/* issue, because there are other sub-directories...
I will move the files as you suggested, but will make sure that the program is working properly, and that it can find the files in the sub-directories...
Will report on this ASAP :-)
Comment 7 gatekeeper 2024-07-20 00:47:25 UTC
Created attachment 252184 [details]
git patch

Again thanks for the quick comments.
Here:
  - MASTER_SITES as suggested
  - lib/*.jar like in old Makefile
  - tested pmd - it is working fine after the changes
  - portlint, etc - all OK
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-20 23:57:07 UTC
My suggestion:
do-install:
        ${RM} ${WRKSRC}/bin/pmd.bat
        cd ${WRKSRC} && ${COPYTREE_SHARE} 'bin conf sbom' ${STAGEDIR}${DATADIR}
        ${RLN} ${STAGEDIR}${DATADIR}/bin/pmd ${STAGEDIR}${PREFIX}/bin/pmd
        ${INSTALL_DATA} ${WRKSRC}/lib/* ${STAGEDIR}${DATADIR}
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-21 02:40:57 UTC
Created attachment 252197 [details]
v2

Check my version of the patch.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-21 03:10:13 UTC
Created attachment 252198 [details]
v3
Comment 11 gatekeeper 2024-07-21 20:05:41 UTC
Created attachment 252213 [details]
git patch

(In reply to Vladimir Druzenko from comment #10)
Hi.
I had a look at your changes - looks really nice and I've learned lots of new stuff - thanks!

I also propose to have a NO_ARCH=yes as this is Java stuff...
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-21 22:44:43 UTC
(In reply to gatekeeper from comment #11)
NO_ARCH=yes is good idea.

BTW, it you use Discord you can connect to official FreeBSD Discord server: https://discord.gg/freebsd
Comment 13 commit-hook freebsd_committer freebsd_triage 2024-07-21 22:59:41 UTC
A commit in branch main references this bug:

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

commit df0a4276fc4e9741ca73772519bbea2349441da9
Author:     gatekeeper <tiago.gasiba@gmail.com>
AuthorDate: 2024-07-21 22:47:12 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-21 22:47:12 +0000

    devel/pmd: update 6.53.0 → 7.3.0 and take maintainership

    Migration from 6.x to 7.x:
    https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_userdocs_migrating_to_pmd7.html

    Chagelogs:
    https://github.com/pmd/pmd/releases/tag/pmd_releases/6.54.0
    https://github.com/pmd/pmd/releases/tag/pmd_releases/6.55.0
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.0.0-rc1
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.0.0-rc2
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.0.0-rc3
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.0.0-rc4
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.0.0
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.1.0
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.2.0
    https://github.com/pmd/pmd/releases/tag/pmd_releases/7.3.0

    PR:     280379

 devel/pmd/Makefile                  |  27 +++++----
 devel/pmd/distinfo                  |   6 +-
 devel/pmd/files/patch-bin_pmd (new) |  79 ++++++++++++++++++++++++
 devel/pmd/pkg-plist                 | 117 ++++++++++++++++++++++++------------
 4 files changed, 177 insertions(+), 52 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2024-07-21 23:03:43 UTC
A commit in branch main references this bug:

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

commit eea1b3a6cc685a34c22954cfc265c5e8990fc76f
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-07-21 23:02:06 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-21 23:02:06 +0000

    devel/pmd: replace PORTVERSION → DISTVERSION

    PR:     280379

 devel/pmd/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-07-23 13:07:04 UTC
A commit in branch main references this bug:

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

commit 39f9b2e1ba93281c5ca5a1d378be5a8a1279cdf1
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-07-23 13:03:35 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-23 13:04:00 +0000

    devel/pmd: use ETCDIR

    PR:     280379

 devel/pmd/Makefile  | 6 +++---
 devel/pmd/pkg-plist | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-07-24 12:33:51 UTC
A commit in branch main references this bug:

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

commit eb893893fa1836b271c539b428cca8575622de9a
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-07-24 12:32:25 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-24 12:32:25 +0000

    devel/pmd: one more use ETCDIR

    PR:     280379

 devel/pmd/Makefile            | 3 ++-
 devel/pmd/files/patch-bin_pmd | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)