Skip to content

Commit

Permalink
Nexus 3.71.0-06
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez committed Nov 15, 2024
1 parent 6f4bdb7 commit 78e7ee6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 54 deletions.
129 changes: 76 additions & 53 deletions SPECS/nexus3-oss.spec
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
%define __os_install_post %{nil}

%if 0%{?suse_version}
%define chkconfig_cmd /usr/bin/chkconfig
%define java_package java-1_8_0-openjdk
%if 0%{?amzn}
%define java_package java-17-amazon-corretto
%else
%define chkconfig_cmd /sbin/chkconfig
%define java_package java-1.8.0-openjdk
%define java_package java-17-openjdk
%endif

# Use systemd for SUSE >= 12 SP1 openSUSE >= 42.1, openSUSE Tumbleweed/Factory, fedora >= 18, rhel >=7 and Amazon Linux >= 2
%if (!0%{?is_opensuse} && 0%{?suse_version} >=1210) || (0%{?is_opensuse} && 0%{?sle_version} >= 120100) || 0%{?suse_version} > 1500
%if (0%{?is_opensuse} || 0%{?suse_version})
%define suse_systemd 1
%endif
%if (0%{?fedora} && 0%{?fedora} >= 18) || (0%{?rhel} && 0%{?rhel} >= 7) || 0%{?amzn} >= 2
%if (0%{?rhel})
%define redhat_systemd 1
%endif
%if 0%{?suse_systemd} || 0%{?redhat_systemd}
%define use_systemd 1
%endif

Summary: Sonatype Nexus Repository manages software "artifacts" and repositories for them
Name: nexus3
# Remember to adjust the version at Source0 as well. This is required for Open Build Service download_files service
Version: 3.70.3.01
Release: 2%{?dist}
Version: 3.71.0.06
Release: 1%{?dist}
# This is a hack, since Nexus versions are N.N.N-NN, we cannot use hyphen inside Version tag
# and we need to adapt to Fedora/SUSE guidelines
%define nversion %(echo %{version}|sed -r 's/(.*)\\./\\1-/')
License: EPL-2.0
Group: Development/Tools/Other
URL: http://nexus.sonatype.org/
Source0: https://download.sonatype.com/nexus/3/nexus-3.70.3-01-java8-unix.tar.gz
Source0: https://download.sonatype.com/nexus/3/nexus-3.71.0-06-unix.tar.gz
Source1: %{name}.service
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
Requires: %{java_package}
%if 0%{?use_systemd}
Requires: systemd
%endif
AutoReqProv: no

%description
Expand All @@ -62,14 +54,9 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}
mv * .install4j $RPM_BUILD_ROOT/usr/share/%{name}
rm -rf $RPM_BUILD_ROOT/usr/share/%{name}/data

%if 0%{?use_systemd}
%{__mkdir} -p %{buildroot}%{_unitdir}
%{__install} -m644 %{SOURCE1} \
%{buildroot}%{_unitdir}/%{name}.service
%else
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
ln -sf /usr/share/%{name}/bin/nexus $RPM_BUILD_ROOT/etc/init.d/%{name}
%endif

mkdir -p $RPM_BUILD_ROOT/etc/
ln -sf /usr/share/%{name}/etc $RPM_BUILD_ROOT/etc/%{name}
Expand All @@ -92,12 +79,12 @@ sed -i -e 's/<File>${karaf.data}\/log\/request.log<\/File>/<File>\/var\/log\/%{n
sed -i -e '/<Set name="selectorPriorityDelta"><Property name="jetty.http.selectorPriorityDelta" default="0"\/><\/Set>/d' $RPM_BUILD_ROOT/usr/share/%{name}/etc/jetty/jetty-http.xml
sed -i -e '/<Set name="selectorPriorityDelta"><Property name="jetty.http.selectorPriorityDelta" default="0"\/><\/Set>/d' $RPM_BUILD_ROOT/usr/share/%{name}/etc/jetty/jetty-https.xml

# Check if 1.8.0 is the default version, as it is what Nexus expects
JAVA_MAJOR_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f2)
if [ "${JAVA_MAJOR_VERSION}" != "8" ]; then
echo "WARNING! Default java version does not seem to be 1.8!"
echo "Keep in mind that Nexus3 is only compatible with Java 1.8.0 at the moment!"
echo "Tip: Check if 1.8 is installed and use (as root):"
# Check if Java 17 is the default version, as it is what Nexus expects
JAVA_MAJOR_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1)
if [ "${JAVA_MAJOR_VERSION}" != "17" ]; then
echo "WARNING! Default java version does not seem to be 17!"
echo "Keep in mind that Nexus3 is only compatible with Java 17 at the moment!"
echo "Tip: Check if 17 is installed and use (as root):"
echo "update-alternatives --config java"
echo "to adjust the default version to be used"
fi
Expand All @@ -118,42 +105,21 @@ fi
if [ $1 -eq 1 ]; then
echo "Autogenerated password for admin user will be stored at /var/lib/nexus3/admin.password after Nexus startup"
fi
if [ $1 -eq 2 ]; then
echo "This is the final warning about the migration from OrientDB to H2/PostgreSQL"
echo "and from Java 1.8 to Java 17"
echo "- The migration to Java 17 is performed automatically, if the OS provides it"
echo "- The migration to H2/PostgreSQL needs to be performed MANUALLY. If you are"
echo " still using OrientDB (you did not perform a migration, Make sure you read"
echo " https://help.sonatype.com/en/migrating-to-a-new-database.html"
echo " and run the procedure before updating to Nexus 3.71.0 or any newer version!"
fi

%preun
%if 0%{?use_systemd}
%if 0%{?suse_systemd}
%service_del_preun %{name}.service
%endif
%if 0%{?redhat_systemd}
%systemd_preun %{name}.service
%endif
%else
# Package removal, not upgrade
if [ $1 = 0 ]; then
/sbin/service %{name} stop > /dev/null 2>&1
%{chkconfig_cmd} --del %{name}
fi
%endif

%postun
%if 0%{?redhat_systemd}
%systemd_postun %{name}.service
%endif
%if 0%{?suse_systemd}
%if 0%{?suse_version} > 1500
%service_del_postun_without_restart %{name}.service
%else
%service_del_postun -n %{name}.service
%endif
%endif

%clean
Expand All @@ -176,13 +142,70 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/%{name}/replicator/
%attr(-,%{name},%{name}) /var/lib/%{name}
%attr(-,%{name},%{name}) /var/log/%{name}
%if 0%{?use_systemd}
%{_unitdir}/%{name}.service
%else
/etc/init.d/%{name}
%endif

%changelog
* Fri Nov 15 2024 Julio González Gil <packages@juliogonzalez.es> - 3.71.0.06-1
- Update to 3.71.0-06
- WARNINGS:
* Removed support for CentOS7, Amazon Linux 2018.03 and any other compatible
systems without Java 17
* Removed support for OrientDB, if you need it
* Check https://help.sonatype.com/en/upgrading-to-nexus-repository-3-71-0-and-beyond.html
before updating to this or any newer version
- Bugfixing:
* NEXUS-43640: Removed the deprecated WATCH_NAMESPACE environment variable
from the HA OpenShift Operator. The Operator now deploys
correctly when installed in a specific namespace
* NEXUS-43337: Content selectors to browse a specific directory listing now
work as expected; content selectors defined as path =~ ".*/"
work as expected
* NEXUS-43268: Caching works as expected for pypi.org simple index pages
* NEXUS-43080: The search_components table is now excluded from tableNames
when the clustering (HA) flag is disabled in
PostgreSQL environments. DBAs should no longer unexpectedly
see "ERROR: relation "search_components" does not exist"
messages
* NEXUS-43037: Directly deleting a tag from OrientDB removes it from the
"tags" table as expected, unblocking database migration using
the newer migrator method that was implemented in 3.69.0
* NEXUS-42974: Improved HA proxy cooperation to reduce failed requests
* NEXUS-42529: Nexus Repository correctly serves Yum packages containing a
colon in the URL path without error
* NEXUS-41935: The removed hyphens from the default values.yaml in the
nxrm-ha helm chart to accommodate an undocumented AWS Secret
Store CSI Provider Driver limitation
* NEXUS-41552: Nexus Repository appropriately logs exceptions that the
"Docker - Delete unused manifests and images" task
might trigger
* NEXUS-40192: When Nexus Repository receives more than one request to
create a new tag with the same name, one request will now
succeed while the other returns an error response alerting
the user that the tag already exists
* NEXUS-39181: Added audit logging for User Token events. See feature
description in improvements listed above
* NEXUS-37993: Converting an Azure blob store to a group blob store works
as expected without errors
* NEXUS-34715: Publishing components using the Maven REST API while also
adding staging tags and then issuing a staging move to another
repository works as expected without error
* NEXUS-31283: Attempts to upload components to a non-root Helm repository now
result in a graceful error message. Components can only be
uploaded to a root Helm repository
- Improvements:
* H2 database available for OSS and is the default for new Installs
* Rolling Upgrade Support for High Availability (HA) Deployments (PRO Only)
* OCI 1.0/1.0.1 Specification Support for Docker
* Manage HTTP Configuration via New REST API (PRO Only)
* Additional Audit Logging
+ Creating a user token
+ Resetting a user token
+ Globally resetting all user tokens
+ The number of API keys removed after running the
"Admin - Delete orphaned API keys" task
+ When user token configuration changes regarding repository access
and authentication

* Sat Nov 2 2024 Julio González Gil <packages@juliogonzalez.es> - 3.70.3.01-2
- This is the final warning about the migration from OrientDB to H2/PostgreSQL
and from Java 1.8 to Java 17!
Expand All @@ -194,7 +217,7 @@ rm -rf $RPM_BUILD_ROOT
and run the procedure before updating to Nexus 3.71.0 or any newer version!

* Mon Oct 28 2024 Julio González Gil <packages@juliogonzalez.es> - 3.70.3.01-1
- Update to 3.70.3-1
- Update to 3.70.3-01
- Dependency Updates in 3.70.3:
* Upgraded protobuf-java from 1.36.0 to 3.25.5
* Upgraded pax-url-aether from 2.6.7 to 2.6.12
Expand Down
2 changes: 1 addition & 1 deletion ci
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ case "${NEXUSMAJORVER}" in
JAVA="1.8";;
3) PACKAGE_NAME='nexus3'
NEXUS_URL='http://localhost:8081/'
JAVA="1.8";;
JAVA="17";;
*) print_error_unsupported_nexus_major_ver
exit 1;;
esac
Expand Down

0 comments on commit 78e7ee6

Please sign in to comment.