Bug 261230 - [NEW PORT] sysutils/p5-RundeckAPI: Easily queries Rundeck's REST API
Summary: [NEW PORT] sysutils/p5-RundeckAPI: Easily queries Rundeck's REST API
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: Nuno Teixeira
URL: https://metacpan.org/dist/RundeckAPI
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-15 15:00 UTC by Xavier Humbert
Modified: 2022-07-23 17:53 UTC (History)
2 users (show)

See Also:


Attachments
sahr file for the port (1.28 KB, text/plain)
2022-01-15 15:00 UTC, Xavier Humbert
no flags Details
Output of git diff --staged (1.45 KB, patch)
2022-07-22 07:31 UTC, Xavier Humbert
no flags Details | Diff
gtt diff 20220723 (1.45 KB, patch)
2022-07-23 08:46 UTC, Xavier Humbert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Humbert 2022-01-15 15:00:45 UTC
Created attachment 231023 [details]
sahr file for the port

This port eases the use of Rundeck REST API from Perl
Example is included in manpage
Comment 1 Xavier Humbert 2022-07-22 06:39:25 UTC
Section for this is sysutils
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 06:52:05 UTC
Hi,

A few points to fix:

1. PORTREVISION must be 0 for a new port or omited.

2. portlint -C:
---
WARN: /usr/home/nunotex/Work/freebsd/ports/sysutils/p5-RundeckAPI/pkg-descr: contains less than 3 lines, make it longer if possible.(currently 2 lines)
WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
WARN: Makefile: "RUN_DEPENDS" has to appear earlier.
---

3. portclippy Makefile:
---
# PORTNAME block
PORTNAME
PORTVERSION
CATEGORIES
MASTER_SITES
MASTER_SITE_SUBDIR
PKGNAMEPREFIX

# Maintainer block
MAINTAINER
COMMENT

# License block
LICENSE

# Dependencies
+BUILD_DEPENDS
+RUN_DEPENDS

# USES block
USES
USE_PERL5

-BUILD_DEPENDS
-RUN_DEPENDS
---

4. portfmt -D Makefile:
---
--- Makefile
+++ Makefile
@@ -1,20 +3,20 @@
+PORTNAME=      RundeckAPI
+PORTVERSION=   1.3.4.1
+CATEGORIES=    sysutils perl5
+MASTER_SITES=  CPAN
-PORTNAME=                      RundeckAPI
-PORTVERSION=           1.3.4.1
-CATEGORIES=                    sysutils perl5
-MASTER_SITES=          CPAN
 MASTER_SITE_SUBDIR=    CPAN:XAVIERH
+PKGNAMEPREFIX= p5-
-PKGNAMEPREFIX=         p5-

+MAINTAINER=    xavier@amdh.fr
+COMMENT=       Easily queries Rundeck's REST API
-MAINTAINER=                    xavier@amdh.fr
-COMMENT=                       Easily queries Rundeck's REST API

+LICENSE=       GPLv2
-LICENSE=                       GPLv2

 USES=          perl5
 USE_PERL5=     configure

+BUILD_DEPENDS= ${RUN_DEPENDS}
+RUN_DEPENDS=   p5-HTTP-Cookies-6.10>0:www/p5-HTTP-Cookies \
+               p5-REST-Client-273>=0:www/p5-REST-Client
-BUILD_DEPENDS=         ${RUN_DEPENDS}
-RUN_DEPENDS=           p5-REST-Client-273>=0:www/p5-REST-Client \
-                                       p5-HTTP-Cookies-6.10>0:www/p5-HTTP-Cookies
---

Cheers
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 06:56:40 UTC
(...)
5. WWW (url) missing in pkg-descr

6. pkg-plist is less than 5 files, list them in PLIST_FILES within Makefile
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 06:58:49 UTC
Please upload a git diff against ports tree instead of a shar archive.
Thanks
Comment 5 Xavier Humbert 2022-07-22 07:31:18 UTC
Created attachment 235418 [details]
Output of git diff --staged
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 08:06:36 UTC
What about using NO_ARCH=yes since dependencies are not achitecture-dependent?
Comment 7 Mathieu Arnold freebsd_committer freebsd_triage 2022-07-22 08:35:27 UTC
(In reply to Nuno Teixeira from comment #6)

NO_ARCH is about the port itself not the dependencies.  Because obviously, all packages depend on pkg, which is architecture dependent, and all p5-* ports depend on Perl, which is also itself architecture dependent.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 14:00:20 UTC
(In reply to Mathieu Arnold from comment #7)
Hi Mathieu,

Thanks for your explanation.

Q/A:
---
===>   Registering installation for p5-RundeckAPI-1.3.4.1
pkg-static: DEVELOPER_MODE: Notice: arch "FreeBSD:14:amd64" -- no architecture specific files found:
**** could this package use a wildcard architecture?
---

and from Porter's Handbook:
---
13.14.2. Marking a Port as Architecture Neutral

Ports that do not have any architecture-dependent files or requirements are identified by setting NO_ARCH=yes.
---

What do you think?

Cheers
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-22 14:11:48 UTC
Final steps:

1. switch to DISTVERSION (instead of PORTVERSION) since version only contains numbers separated by dots, dashes or underscores

2. 'MAINTAINER= xavier@amdh.fr' doesn't match bugzilla account email 'xavier@groumpf.org', consider updating/changing e-mail and add a account name, so we can have "Name <e-mail>" usefull for git commits. 

3. Add LICENSE_FILE= ${WRKSRC}/LICENSE

4. Q/A:
---
===>  Configuring for p5-RundeckAPI-1.3.4.1
Odd number of elements in anonymous hash at ./Makefile.PL line 5.
Warning: prerequisite JSON 2.15 not found.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for RundeckAPI
Writing MYMETA.yml and MYMETA.json
---

Should JSON be a dependency?
Comment 10 Xavier Humbert 2022-07-23 08:42:19 UTC
| Final steps:
| 
| 1. switch to DISTVERSION (instead of PORTVERSION) since version only contains
| numbers separated by dots, dashes or underscores

Done

| 2. 'MAINTAINER= xavier@amdh.fr' doesn't match bugzilla account email
| 'xavier@groumpf.org', consider updating/changing e-mail and add a account name,
| so we can have "Name <e-mail>" usefull for git commits. 

Done
 
| 3. Add LICENSE_FILE= ${WRKSRC}/LICENSE

This is already the case
 
| 4. Q/A:
| ---
| ===>  Configuring for p5-RundeckAPI-1.3.4.1
| Odd number of elements in anonymous hash at ./Makefile.PL line 5.

Never managed to avoid that. A bug in Perl Makefile model ?

| Warning: prerequisite JSON 2.15 not found.
| Checking if your kit is complete...
| Looks good
| Generating a Unix-style Makefile
| Writing Makefile for RundeckAPI
| Writing MYMETA.yml and MYMETA.json
| ---
| 
| Should JSON be a dependency?

Yes but afaik, it is in base Perl, while CPAN requires ALL deps. Should I repackage the source ?
Regards
Comment 11 Xavier Humbert 2022-07-23 08:46:08 UTC
Created attachment 235438 [details]
gtt diff 20220723
Comment 12 commit-hook freebsd_committer freebsd_triage 2022-07-23 17:45:04 UTC
A commit in branch main references this bug:

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

commit 7a1831b6f5a4bcebff65f9f703cd8dd471eb0321
Author:     Xavier <xavier@groumpf.org>
AuthorDate: 2022-07-23 17:41:30 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-07-23 17:41:30 +0000

    sysutils/p5-RundeckAPI: New port: Easily queries Rundeck's REST API

     - submitter becomes maintainer

    RundeckAPI
    simplifies authenticate, connect, queries to a Rundeck instance via REST API

    WWW: https://metacpan.org/dist/RundeckAPI

    PR:             261230

 sysutils/Makefile                      |  1 +
 sysutils/p5-RundeckAPI/Makefile (new)  | 23 +++++++++++++++++++++++
 sysutils/p5-RundeckAPI/distinfo (new)  |  3 +++
 sysutils/p5-RundeckAPI/pkg-descr (new) |  4 ++++
 4 files changed, 31 insertions(+)
Comment 13 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-23 17:51:56 UTC
 - removed deprecated "Created 

Committed, thanks!
Comment 14 Nuno Teixeira freebsd_committer freebsd_triage 2022-07-23 17:53:17 UTC
* -removed deprecated "Created by"