Bug 273495 - [NEW PORT] devel/reposilite: repository manager for Maven based artifacts in JVM ecosystem
Summary: [NEW PORT] devel/reposilite: repository manager for Maven based artifacts in ...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://reposilite.com
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-01 09:09 UTC by Einar Bjarni Halldórsson
Modified: 2023-09-05 07:40 UTC (History)
2 users (show)

See Also:


Attachments
Adds new port, devel/reposilite (6.29 KB, application/mbox)
2023-09-01 09:09 UTC, Einar Bjarni Halldórsson
no flags Details
Add new port devel/reposilite, fixed portlint issues (6.12 KB, patch)
2023-09-01 11:15 UTC, Einar Bjarni Halldórsson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Bjarni Halldórsson 2023-09-01 09:09:43 UTC
Created attachment 244554 [details]
Adds new port, devel/reposilite

New port for reposilite [https://reposilite.com], a lightweight repository manager for Maven based artifacts.

Very useful since artifactory is now FORBIDDEN.
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2023-09-01 09:23:59 UTC
As you have mentioned that this is your first port, have you ran portlint -abct, portfmt, portclippy?
Have you tested this port in poudriere specially on 12.4 i386, 12.4 amd64, 13.2, amd64 and preferably 14.0 SNAPSHOT amd64?
Have you tried make index after adding the ports tree?

These are the basic checklist any committer will go through before committing so if you can do that before hand it definitely reduces the time required to commit.
Comment 2 Einar Bjarni Halldórsson 2023-09-01 09:25:56 UTC
(In reply to Muhammad Moinur Rahman from comment #1)

No, I've only tested building in poudriere on 13.2.

I'll go through the list and fix any problems I might find
Comment 3 Einar Bjarni Halldórsson 2023-09-01 11:15:54 UTC
Created attachment 244556 [details]
Add new port devel/reposilite, fixed portlint issues

Fixed issues discovered by portlint
Comment 4 Einar Bjarni Halldórsson 2023-09-01 11:32:24 UTC
Ran `port test` and fixed all warnings and errors.

I get a warning about dependecy not being declared on /usr/local/openjdk11/bin/java, but I'm not sure I need it if I have USE_JAVA and JAVA_VERSION in Makefile?

It builds in Poudriere 13.2. It just fetches the jar from upstream, so it's very unlikely that any port specific issues are found on other releases or archs
Comment 5 Michael Osipov 2023-09-04 19:36:01 UTC
Will review in the next couple of days if you leave the time for it.

Please note that there is also Nexus 2 OSS in the tree for years now.
Comment 6 Michael Osipov 2023-09-05 07:40:13 UTC
A few issues:

* Makefile:
** Should have:
NO_ARCH=	yes
NO_BUILD=	yes
NO_TEST=	yes
** Empty STRIP isn't necessary
** USE_RC_SUBR=${PORTNAME}
** REPOSILITEUSER?=${PORTNAME}
** I was once told that one should supply the DISTVERSION only and the framework will derive the PORTVERSION automatically
* reposilite.in:
** reposilite_run_dir => reposilite_rundir (similar to etcdir=
** reposilite_rundir: should be filtered from the Makefile
** reposilite_user: should be filtered from the Makefile
** reposilite_dir: does not make sense because the JAR cannot be moved, it is mandated by the Makefile (convention) especially because you have hardcoded the JAR name
** Beat me, but where does daemon(8) receive user/group to drop privs?
** Who needs this "export JAVA_HOME=${reposilite_java_home}"?
** reposilite_java_home is not used at all! reposilite_cmd completely ignores it. Totally defeats the purpose
** required_files: Does not make sense to me. Java presence is during build/installation; ${reposilite_config} is never created by you at installation time
** I believe that this is redundant: reposilite_precmd. All required trees should be created at installation time: See https://github.com/michael-o/freebsd-ports/blob/c44ab5af99444359c6baab54143f2ddf8d21d999/devel/nexus2-oss/Makefile#L106-L108 and added to pkg-plist
** This is logically wrong: ${reposilite_dir:="%%DATADIR%%"}. DATADIR is in share for static (!) files installed and used read-only at runtime. It is not a work directory. What you need is ${reposilite_workdir:="%%WORKDIR%%"} where WORKDIR points to /var/reposilite. 
** The header comment are partially inconsistent, e.g. rundir.
** folder ==> directory
** reposilite_flags or reposilite_args? Sould be args...
** reposilite_max_mem should be generalized to reposilite_java_opts. Why 32M? Leave it empty since this should be user-configured unless you know better.
** reposilite_cmd: This should not be overwritable, no?

Yes, I am picky, but the later you address the issues the more expensive it is going to be.

Please have a look at by Nexus 2 port, it separates between etcdir/rundir/workdir and datadir. Should be here as well: https://github.com/michael-o/freebsd-ports/tree/master/devel/nexus2-oss