Bug 203074 - [NEW PORT] devel/nexus2-oss: Repository management software
Summary: [NEW PORT] devel/nexus2-oss: Repository management software
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: Carlos J. Puga Medina
URL:
Keywords: feature, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-09-13 16:29 UTC by Dušan Vejnovič
Modified: 2016-11-12 16:22 UTC (History)
6 users (show)

See Also:


Attachments
shar file for devel/nexus-oss (43.11 KB, text/plain)
2015-09-13 16:29 UTC, Dušan Vejnovič
no flags Details
poudriere build log for devel/nexus-oss (19.73 KB, text/x-log)
2015-09-13 16:30 UTC, Dušan Vejnovič
no flags Details
new groups (304 bytes, patch)
2015-09-13 16:30 UTC, Dušan Vejnovič
no flags Details | Diff
new users (957 bytes, patch)
2015-09-13 16:30 UTC, Dušan Vejnovič
no flags Details | Diff
shar file for devel/nexus-oss (42.17 KB, text/plain)
2015-12-25 18:24 UTC, Dušan Vejnovič
no flags Details
poudriere build log for devel/nexus-oss (22.04 KB, text/x-log)
2015-12-25 18:25 UTC, Dušan Vejnovič
no flags Details
shar file for devel/nexus-oss (53.35 KB, text/plain)
2016-06-26 10:50 UTC, Dušan Vejnovič
freebsd: maintainer-approval+
Details
SHAR file for nexus2-oss (48.04 KB, text/plain)
2016-09-29 09:33 UTC, Michael Osipov
no flags Details
Patch for /usr/ports/GIDs (220 bytes, patch)
2016-09-29 09:34 UTC, Michael Osipov
no flags Details | Diff
Patch for /usr/ports/UIDs (288 bytes, patch)
2016-09-29 09:34 UTC, Michael Osipov
no flags Details | Diff
SHAR file for nexus2-oss (48.07 KB, text/plain)
2016-09-29 13:21 UTC, Michael Osipov
no flags Details
nexus-oss.shar (53.01 KB, patch)
2016-11-07 15:36 UTC, Carlos J. Puga Medina
no flags Details | Diff
SHAR file for nexus2-oss (47.60 KB, text/plain)
2016-11-12 11:10 UTC, Michael Osipov
koobs: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dušan Vejnovič 2015-09-13 16:29:55 UTC
Created attachment 160987 [details]
shar file for devel/nexus-oss

Nexus OSS provides you with an essential level of control over the external
repositories you use and the internal repositories you create. It provides
infrastructure and services for organizations that use repository managers to
obtain and deliver software. If you create software libraries or applications
for your end users, you can use Nexus OSS to distribute your software. If your
software depends on open source software components, you can cache software
components from remote repositories.

Nexus OSS Features:
- Hosting Repositories
- Proxy Remote Repositories
- Repository Groups
- Numerous Repository Formats
- Hosting Project Web Sites
- Fine-grained Security Model
- Flexible LDAP Integration
- Component Search
- Scheduled Tasks
- REST Services
- Integration with m2eclipse

WWW: http://www.sonatype.org/nexus/
Comment 1 Dušan Vejnovič 2015-09-13 16:30:24 UTC
Created attachment 160988 [details]
poudriere build log for devel/nexus-oss
Comment 2 Dušan Vejnovič 2015-09-13 16:30:40 UTC
Created attachment 160989 [details]
new groups
Comment 3 Dušan Vejnovič 2015-09-13 16:30:55 UTC
Created attachment 160990 [details]
new users
Comment 4 Dušan Vejnovič 2015-12-25 18:24:43 UTC
Created attachment 164633 [details]
shar file for devel/nexus-oss

- removed nexus user and group
- added www user and group
- removed iconv from USES
- added iconv dependency to LIB_DEPENDS
- optimized re-inplace command in post-patch section
Comment 5 Dušan Vejnovič 2015-12-25 18:25:26 UTC
Created attachment 164634 [details]
poudriere build log for devel/nexus-oss
Comment 6 Dušan Vejnovič 2016-06-26 10:50:35 UTC
Created attachment 171815 [details]
shar file for devel/nexus-oss

Upgrade to 2.13.0
Comment 7 Michael Osipov 2016-09-29 09:32:59 UTC
We need Nexus in the Ports tree too.

Based on Dušan's great work, I have created an improved port in several ways:
* Reuse nexus user because it is not a general-purpose web server like Apache, Jetty, Tomcat, etc.
* DATADIR is now cleanly, according to the Porter's Handbook, /usr/local/share/java/nexus2
* Portname is nexus2(-oss) because there is Nexus 3 which is a new and different product
* Clean separation of work, log and run in /var/nexus2, /var/log/nexus2, /var/run/nexu2
* All config happens in /usr/local/etc/nexus2
* JSW stuff removed from DATADIR as it is completely outdated and available in the Ports tree anyway
* Wrapper is directly started from rc script, avoiding the need for another shell script
* Updated version to 2.14.0-01

See attached patches for /usr/ports/{UIDs,GIDS} and shar file.
Comment 8 Michael Osipov 2016-09-29 09:33:26 UTC
Created attachment 175265 [details]
SHAR file for nexus2-oss
Comment 9 Michael Osipov 2016-09-29 09:34:05 UTC
Created attachment 175266 [details]
Patch for /usr/ports/GIDs
Comment 10 Michael Osipov 2016-09-29 09:34:28 UTC
Created attachment 175267 [details]
Patch for /usr/ports/UIDs
Comment 11 Michael Osipov 2016-09-29 09:35:30 UTC
Port is also available on GitHub: https://github.com/michael-o/freebsd-ports/tree/master/devel/nexus2-oss
Comment 12 Michael Osipov 2016-09-29 09:42:14 UTC
portlint and rclint are also happy, both constantly applied during development.
Comment 13 Michael Osipov 2016-09-29 13:21:23 UTC
Created attachment 175269 [details]
SHAR file for nexus2-oss

Updated archive: Nexus failed with "WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock."
No writable home exists for this prefs file.

User prefs have been redirected to %%WORKDIR%%

References: http://stackoverflow.com/q/2027566/696632 and http://www.allaboutbalance.com/articles/disableprefs/
Comment 14 Michael Osipov 2016-11-04 08:55:16 UTC
Anyone willing to take a look?
Comment 15 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-04 16:51:39 UTC
(In reply to Michael Osipov from comment #14)

Currently I'm testing nexus2-oss port via 'poudriere testport'. 

If all build logs are fine, I'll commit it into the ports tree as soon as I get my mentor's approval.
Comment 16 Dušan Vejnovič 2016-11-04 17:39:38 UTC
(In reply to Michael Osipov from comment #7)

Thank for your improvements.

But I have some questions:
- who will be maintainer
- why not used existing GID (www) and UID (www) because nexus is HTTP server based on jetty

Bye, Dušan.
Comment 17 Michael Osipov 2016-11-04 21:33:07 UTC
(In reply to Carlos J. Puga Medina from comment #15)

Perfect, thank you. Let me know if something isn't right.
Comment 18 Michael Osipov 2016-11-04 21:39:40 UTC
(In reply to Dušan Vejnovič from comment #16)

> But I have some questions:
> - who will be maintainer

I don't mind being it. I have conversations with the devs once in a while and am a Maven PMC member for quite sometime, moreover a happy FreeBSD user.

> - why not used existing GID (www) and UID (www) because nexus is HTTP server based on jetty

It's not based on Jetty, it simply uses Jetty and Nexus isn't just a webservr. Jetty is an implementation detail, it could be also Tomcat, Undertow or some other servlet container. It is a complete application, more specifically a database for binary artifacts with an extended permissions concept which happens to serve via HTTP. Simply treat is as an opaque application.

I always follow least priviledge principle, Nexus does not need to have access to Apache's file, so neither does Apache has to.
Comment 19 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-05 19:44:56 UTC
(In reply to Michael Osipov from comment #17)

devel/nexus2-oss:

All builds are fine on 9.3/ia, 10.2/ia and 10.3/ia.
Comment 20 Michael Osipov 2016-11-05 20:06:48 UTC
(In reply to Carlos J. Puga Medina from comment #19)

Perfect! I have this already in production on 9.3-STABLE i386 and tested on 10.3-RELEASE amd64 and 11.0-STABLE i386.
Comment 21 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-07 15:36:27 UTC
Created attachment 176746 [details]
nexus-oss.shar

devel/nexus-oss:

All builds are fine on 9.3/ia, 10.2/ia and 10.3/ia.
Comment 22 Michael Osipov 2016-11-07 19:21:01 UTC
(In reply to Carlos J. Puga Medina from comment #21)

Are you testing both shars? The one you have attached/linked is outdated.
Comment 23 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-07 19:35:16 UTC
(In reply to Michael Osipov from comment #22)

Ok, I changed the bug summary to avoid further confusion.
Comment 24 Mark Felder freebsd_committer freebsd_triage 2016-11-11 23:10:09 UTC
Approved if you fix the spaces -> tab issue portlint picks up.
Comment 25 Michael Osipov 2016-11-12 11:10:50 UTC
Created attachment 176914 [details]
SHAR file for nexus2-oss

New shar file:

* Fixed space => tab in Makefile (portlint message)
* Sorted files with "find devel/nexus2-oss | sort"
* Removed README.md which should only be part of my Git repo
Comment 26 Kubilay Kocak freebsd_committer freebsd_triage 2016-11-12 11:14:07 UTC
@Carlos An extra pass for final QA (poudrier:archs/versions, options, portlint) would be prudent
Comment 27 Kubilay Kocak freebsd_committer freebsd_triage 2016-11-12 11:14:37 UTC
Comment on attachment 176914 [details]
SHAR file for nexus2-oss

Mentor approval
Comment 28 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-12 14:30:38 UTC
(In reply to Kubilay Kocak from comment #26)

portlint -AC output:
WARN: Makefile: possible use of absolute pathname "/var/run/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/var/${PORTNAME}".
WARN: /usr/local/poudriere/ports/default/devel/nexus2-oss/distinfo: [1]: TIMESTAMP is over 30 days old
0 fatal errors and 4 warnings found.


poudriere testport -j 93x32 -o devel/nexus2-oss  [OK]
poudriere testport -j 93x64 -o devel/nexus2-oss  [OK]
poudriere testport -j 102x32 -o devel/nexus2-oss [OK]
poudriere testport -j 102x64 -o devel/nexus2-oss [OK]
poudriere testport -j 103x32 -o devel/nexus2-oss [OK]
poudriere testport -j 103x64 -o devel/nexus2-oss [OK]
Comment 29 Michael Osipov 2016-11-12 15:00:53 UTC
(In reply to Carlos J. Puga Medina from comment #28)

Unfortunately, I haven't found any predefined variables to avoid those three warnings. Hopefully they are acceptable.
Comment 30 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-12 15:12:14 UTC
(In reply to Michael Osipov from comment #29)

It's OK! But you should remove all directories from devel/nexus2-oss/files/* and create a new patch for logback.properties
Comment 31 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-12 15:21:11 UTC
(In reply to Carlos J. Puga Medina from comment #30)

Forget my previous comment.

It's ready to be committed :)
Comment 32 Michael Osipov 2016-11-12 15:28:05 UTC
(In reply to Carlos J. Puga Medina from comment #30)
 
I actually did that on purpose to denote that this is not going to conf, but is nested in the JAR which has to be updated with unzip/zip.
Comment 33 commit-hook freebsd_committer freebsd_triage 2016-11-12 15:32:07 UTC
A commit references this bug:

Author: cpm
Date: Sat Nov 12 15:31:15 UTC 2016
New revision: 425961
URL: https://svnweb.freebsd.org/changeset/ports/425961

Log:
  [NEW PORT] devel/nexus2-oss: Repository management software

  Nexus Repository Manager OSS provides you with an essential level of control
  over the external repositories you use and the internal repositories you create.
  It provides infrastructure and services for organizations that use repository
  managers to obtain and deliver software. If you create software libraries or
  applications for your end users, you can use Nexus Repository Manager OSS to
  distribute your software. If your software depends on open source software
  components, you can cache software components from remote repositories.

  Nexus Repository Manager OSS features:
  - Hosting repositories
  - Proxy remote repositories
  - Repository groups
  - Numerous repository formats
  - Hosting project websites
  - Fine-grained security model
  - Flexible LDAP integration
  - Component search
  - Scheduled rasks
  - REST services
  - Integration with m2eclipse

  WWW: https://www.sonatype.com/nexus-repository-oss

  PR:		203074
  Submitted by:	Dusan Vejnovic <freebsd@dussan.org>, Michael Osipov <1983-01-06@gmx.net> (maintainer)
  Reviewed by:	feld, junovitch, koobs (mentors)
  Approved by:	feld, junovitch, koobs (mentors)

Changes:
  head/GIDs
  head/UIDs
  head/devel/Makefile
  head/devel/nexus2-oss/
  head/devel/nexus2-oss/Makefile
  head/devel/nexus2-oss/distinfo
  head/devel/nexus2-oss/files/
  head/devel/nexus2-oss/files/nexus/
  head/devel/nexus2-oss/files/nexus/WEB-INF/
  head/devel/nexus2-oss/files/nexus/WEB-INF/lib/
  head/devel/nexus2-oss/files/nexus/WEB-INF/lib/nexus-core.jar/
  head/devel/nexus2-oss/files/nexus/WEB-INF/lib/nexus-core.jar/META-INF/
  head/devel/nexus2-oss/files/nexus/WEB-INF/lib/nexus-core.jar/META-INF/log/
  head/devel/nexus2-oss/files/nexus/WEB-INF/lib/nexus-core.jar/META-INF/log/logback.properties
  head/devel/nexus2-oss/files/nexus2.in
  head/devel/nexus2-oss/files/patch-conf_jetty-requestlog.xml
  head/devel/nexus2-oss/files/patch-conf_logback-access.xml
  head/devel/nexus2-oss/files/patch-conf_logback.xml
  head/devel/nexus2-oss/files/patch-conf_nexus.properties
  head/devel/nexus2-oss/files/patch-conf_wrapper.conf
  head/devel/nexus2-oss/files/pkg-message.in
  head/devel/nexus2-oss/pkg-descr
  head/devel/nexus2-oss/pkg-plist
Comment 34 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-12 15:33:50 UTC
(In reply to Michael Osipov from comment #32)

Committed!

Thanks for your contribution
Comment 35 Michael Osipov 2016-11-12 16:22:38 UTC
(In reply to Carlos J. Puga Medina from comment #34)

Thank you so much for reviewing, testing and finally committing.