Skip to content

Commit

Permalink
Bump for OnDemand 2.1 (#145)
Browse files Browse the repository at this point in the history
* Bump OnDemand version to build for

* New buildbox with 2.1 build repo
Remove ondemand-python meta RPM, not needed
Bump nodejs to 14

* Update Passenger to 6.0.11 and NGINX to 1.20.1

* Add ondemand-release 2.1 packages for Ubuntu Focal

* Ensure old ondemand-python is automatically removed
  • Loading branch information
treydock authored Nov 2, 2021
1 parent 08466de commit d882b84
Show file tree
Hide file tree
Showing 20 changed files with 99 additions and 43 deletions.
5 changes: 4 additions & 1 deletion bump-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ def main():
files_to_modify = {
'packages/ondemand-release/ondemand-compute.repo': '/REPLACE/',
'packages/ondemand-release/ondemand-web.repo': '/REPLACE/',
'docker-image/epel-7-x86_64.cfg': '/REPLACE/',
'docker-image/epel-8-x86_64.cfg': '/REPLACE/',
'docker-image/ondemand-el7-x86_64.cfg': '/REPLACE/',
'docker-image/ondemand-el8-x86_64.cfg': '/REPLACE/',
'packages/passenger/passenger.spec': 'runtime_version REPLACE'
'packages/passenger/passenger.spec': 'runtime_version REPLACE',
'release-manifest.yaml': "'REPLACE",
}
for spec in specs_to_modify:
reset_version_release(spec, args.previous_release, args.new_release)
Expand Down
2 changes: 1 addition & 1 deletion docker-image/env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BUILDBOX_IMAGE='ohiosupercomputer/ondemand_buildbox:3.2.1'
BUILDBOX_IMAGE='ohiosupercomputer/ondemand_buildbox:4.0.0'
DEB_BUILDBOX_IMAGE=ohiosupercomputer/ondemand_buildbox-$DIST-$DISTVERSION:0.2.0
MOCK_CACHE=$(echo "mock-cache-${BUILDBOX_IMAGE}.tar.gz" | sed 's#/#_#g' | sed 's#:#_#g')
2 changes: 1 addition & 1 deletion docker-image/epel-7-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config_opts['plugin_conf']['package_state_opts']['installed_pkgs'] = False
config_opts['yum.conf'] += """
[ondemand-web-build-base]
name=ondemand-web
baseurl=https://yum.osc.edu/ondemand/build/2.0/web/el7/x86_64/
baseurl=https://yum.osc.edu/ondemand/build/2.1/web/el7/x86_64/
priority=1
enabled=0
"""
2 changes: 1 addition & 1 deletion docker-image/epel-8-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config_opts['chroot_setup_cmd'] += ' scl-utils scl-utils-build selinux-policy'
config_opts['yum.conf'] += """
[ondemand-web-build-base]
name=ondemand-web
baseurl=https://yum.osc.edu/ondemand/build/2.0/web/el8/x86_64/
baseurl=https://yum.osc.edu/ondemand/build/2.1/web/el8/x86_64/
priority=1
enabled=0
"""
4 changes: 2 additions & 2 deletions docker-image/ondemand-el7-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ include('/etc/mock/epel-7-x86_64.cfg')
config_opts['root'] = 'ondemand-el7-x86_64'

config_opts['chroot_setup_cmd'] += ' selinux-policy-devel'
config_opts['chroot_setup_cmd'] += ' ondemand-runtime ondemand-ruby ondemand-nodejs ondemand-python'
config_opts['chroot_setup_cmd'] += ' ondemand-runtime ondemand-ruby ondemand-nodejs'
config_opts['chroot_setup_cmd'] += ' rsync git libxslt-devel zlib-devel sqlite-devel'

config_opts['plugin_conf']['yum_cache_enable'] = False

config_opts['yum.conf'] += """
[ondemand-web-build]
name=ondemand-web
baseurl=https://yum.osc.edu/ondemand/build/2.0/web/el7/x86_64/
baseurl=https://yum.osc.edu/ondemand/build/2.1/web/el7/x86_64/
priority=1
"""
6 changes: 3 additions & 3 deletions docker-image/ondemand-el8-x86_64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ include('/etc/mock/epel-8-x86_64.cfg')
config_opts['root'] = 'ondemand-el8-x86_64'

config_opts['chroot_setup_cmd'] += ' selinux-policy-devel'
config_opts['chroot_setup_cmd'] += ' ondemand-runtime ondemand-ruby ondemand-nodejs ondemand-python'
config_opts['chroot_setup_cmd'] += ' ondemand-runtime ondemand-ruby ondemand-nodejs'
config_opts['chroot_setup_cmd'] += ' rsync git libxslt-devel zlib-devel sqlite-devel'
# Needed as sometimes not pulled in and won't be needed once ondemand-runtime-2.1 is built
config_opts['chroot_setup_cmd'] += ' rubygem-bigdecimal'

config_opts['plugin_conf']['yum_cache_enable'] = False

config_opts['module_enable'] = ['nodejs:12', 'ruby:2.7']
config_opts['module_enable'] = ['nodejs:14', 'ruby:2.7']

config_opts['yum.conf'] += """
[ondemand-web-build]
name=ondemand-web
baseurl=https://yum.osc.edu/ondemand/build/2.0/web/el8/x86_64/
baseurl=https://yum.osc.edu/ondemand/build/2.1/web/el8/x86_64/
priority=1
"""
9 changes: 9 additions & 0 deletions packages/deb/ondemand-release/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))

.PHONY: tar
TAR := tar
VERSION := 2.1.0

tar:
cd $(DIR) ; git ls-files . | $(TAR) -c \
--transform 's,^,ondemand-release-$(VERSION)/,' -T - | gzip > $(DIR)/build/ondemand-release-$(VERSION).tar.gz
6 changes: 6 additions & 0 deletions packages/deb/ondemand-release/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ondemand-release (2.1-1) UNRELEASED; urgency=low

* Initial release. Closes: #nnnn
<nnnn is the bug number of your ITP>

-- root <> Tue, 26 Oct 2021 15:02:14 -0400
1 change: 1 addition & 0 deletions packages/deb/ondemand-release/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
14 changes: 14 additions & 0 deletions packages/deb/ondemand-release/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Source: ondemand-release
Section: unknown
Priority: optional
Maintainer: Trey Dockendorf <[email protected]>
Build-Depends: debhelper (>=11~)
Standards-Version: 4.1.4
Homepage: https://github.com/OSC/ondemand-packaging

Package: ondemand-release-web-focal
Architecture: all
Multi-Arch: foreign
Depends: ${shlibs:Depends},
${misc:Depends}
Description: OnDemand repo release files for 2.1 web repo for Focal OS
15 changes: 15 additions & 0 deletions packages/deb/ondemand-release/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ondemand-release
Source: <url://example.com>
#
# Please double check copyright with the licensecheck(1) command.

Files: debian/Makefile
debian/build/.keep
debian/ondemand.gpg
Copyright: __NO_COPYRIGHT_NOR_LICENSE__
License: __NO_COPYRIGHT_NOR_LICENSE__

#----------------------------------------------------------------------------
# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
# license/copyright files.
21 changes: 21 additions & 0 deletions packages/deb/ondemand-release/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/make -f
# You must remove unused comment lines for the released package.
export DH_VERBOSE = 1
export CODENAME = $(shell lsb_release -sc)
export WEB_DESTDIR = $(CURDIR)/debian/ondemand-release-web
export DEB_BUILD_OPTIONS=nocheck

%:
dh $@

override_dh_auto_configure:
# Do nothing

override_dh_auto_build:
# Do nothing

override_dh_auto_install:
mkdir -p $(WEB_DESTDIR)-focal/etc/apt/sources.list.d
echo "deb [arch=amd64] https://apt.osc.edu/ondemand/$(VERSION)/web/apt $(CODENAME) main" > $(WEB_DESTDIR)-focal/etc/apt/sources.list.d/ondemand-web.list
mkdir -p $(WEB_DESTDIR)-focal/etc/apt/trusted.gpg.d
install -m 644 -D $(CURDIR)/ondemand.gpg $(WEB_DESTDIR)-focal/etc/apt/trusted.gpg.d/ondemand-web.gpg
Binary file added packages/deb/ondemand-release/ondemand.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/ondemand-compute/ondemand-compute.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: ondemand-compute
Version: 2.0
Version: 2.1
Release: 1%{?dist}
Summary: Open OnDemand Compute meta package

Expand Down
4 changes: 2 additions & 2 deletions packages/ondemand-release/ondemand-compute.repo
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[ondemand-compute]
name=Open OnDemand Compute Repo
baseurl=https://yum.osc.edu/ondemand/2.0/compute/el$releasever/$basearch/
baseurl=https://yum.osc.edu/ondemand/2.1/compute/el$releasever/$basearch/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ondemand-compute

[ondemand-compute-source]
name=Open OnDemand Compute Repo - source
baseurl=https://yum.osc.edu/ondemand/2.0/compute/el$releasever/SRPMS/
baseurl=https://yum.osc.edu/ondemand/2.1/compute/el$releasever/SRPMS/
enabled=0
gpgcheck=1
repo_gpgcheck=1
Expand Down
2 changes: 1 addition & 1 deletion packages/ondemand-release/ondemand-release.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: ondemand-release-web
Version: 2.0
Version: 2.1
Release: 1
Summary: Open OnDemand web repository files

Expand Down
4 changes: 2 additions & 2 deletions packages/ondemand-release/ondemand-web.repo
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[ondemand-web]
name=Open OnDemand Web Repo
baseurl=https://yum.osc.edu/ondemand/2.0/web/el$releasever/$basearch/
baseurl=https://yum.osc.edu/ondemand/2.1/web/el$releasever/$basearch/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ondemand

[ondemand-web-source]
name=Open OnDemand Web Repo
baseurl=https://yum.osc.edu/ondemand/2.0/web/el$releasever/SRPMS/
baseurl=https://yum.osc.edu/ondemand/2.1/web/el$releasever/SRPMS/
enabled=0
gpgcheck=1
repo_gpgcheck=1
Expand Down
19 changes: 4 additions & 15 deletions packages/ondemand-runtime/ondemand-runtime.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@

%if 0%{?rhel} >= 8
%global ruby ruby
%global python python2
%global nodejs nodejs
%global apache httpd
%else
%global ruby rh-ruby27
%global python python
%global nodejs rh-nodejs12
%global nodejs rh-nodejs14
%global apache httpd24
%endif
%global ruby_version 2.7
Expand All @@ -20,7 +18,7 @@
%global ondemand_core_gem_home %{ondemand_gem_home}/ondemand

Name: ondemand-runtime
Version: 2.0
Version: 2.1
Release: 1%{?dist}
Summary: Package that handles %{scl} Software Collection.
License: MIT
Expand All @@ -32,6 +30,7 @@ Requires: %{ruby}-runtime
Requires: %{nodejs}-runtime
Requires: %{apache}-runtime
%endif
Obsoletes: ondemand-python

%description
Package shipping essential scripts to work with %{scl} Software Collection.
Expand Down Expand Up @@ -80,17 +79,10 @@ Obsoletes: ondemand-rubygem-bundler
%description -n ondemand-ruby
Meta package for pulling in SCL Ruby %{ruby}

%package -n ondemand-python
Summary: Meta package for pulling in Python needed by OnDemand
Requires: %{python}

%description -n ondemand-python
Meta package for pulling in Python needed by OnDemand

%package -n ondemand-nodejs
Summary: Meta package for pulling in SCL nodejs %{nodejs}
%if 0%{?rhel} >= 8
Requires: %{nodejs} >= 1:12.0, %{nodejs} < 1:14.0
Requires: %{nodejs} >= 1:14.0, %{nodejs} < 1:16.0
Requires: npm
%else
Requires: %{nodejs}
Expand Down Expand Up @@ -130,7 +122,6 @@ cat >> %{buildroot}%{_scl_scripts}/enable << EOF
%if 0%{?rhel} <= 7
. scl_source enable %{apache} %{ruby} %{nodejs}
%endif
export PYTHON=%{python}
export PATH="%{_bindir}:%{_sbindir}\${PATH:+:\${PATH}}"
export LD_LIBRARY_PATH="%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}"
export MANPATH="%{_mandir}:\${MANPATH:-}"
Expand Down Expand Up @@ -180,8 +171,6 @@ EOF
%{ondemand_apps_gem_home}
%{ondemand_core_gem_home}

%files -n ondemand-python

%files -n ondemand-nodejs

%files -n ondemand-apache
Expand Down
13 changes: 4 additions & 9 deletions packages/passenger/passenger.spec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
%define scl ondemand
%define pkg_name passenger
%scl_package passenger
%define passenger_version 6.0.7
%define nginx_version 1.18.0
%define passenger_version 6.0.11
%define nginx_version 1.20.1
%define release_version 1
%define ngix_release_version 2
%define ngix_release_version 1

%define runtime_version 2.0
%define runtime_version 2.1
%define runtime_major_version %(echo %{runtime_version} | cut -d. -f1)
%define runtime_minor_version %(echo %{runtime_version} | cut -d. -f2)
%define next_runtime_major_version %(echo $((%{runtime_major_version}+1))).0
Expand Down Expand Up @@ -39,7 +39,6 @@ Group: System Environment/Daemons
License: Boost and BSD and BSD with advertising and MIT and zlib
Source0: https://github.com/phusion/passenger/releases/download/release-%{passenger_version}/passenger-%{passenger_version}.tar.gz
Source1: http://nginx.org/download/nginx-%{nginx_version}.tar.gz
Patch0: http://nginx.org/download/patch.2021.resolver.txt

%{?scl:Requires:%scl_runtime}
%{?scl:BuildRequires:%scl_runtime}
Expand Down Expand Up @@ -105,10 +104,6 @@ memory usage. Includes Phusion Passenger support.
%prep
%setup -q -n %{pkg_name}-%{passenger_version}
%setup -q -T -D -a 1 -n %{pkg_name}-%{passenger_version}
pushd nginx-%{nginx_version}
%patch0 -p0
popd


%build
scl enable ondemand - << \EOF
Expand Down
11 changes: 7 additions & 4 deletions release-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
major: '2.0'
full: '2.0.18'
major: '2.1'
full: '2.1.0'

# release
ondemand-release:
Expand All @@ -8,6 +8,9 @@ ondemand-release:
- ondemand-release-web
versions:
- '{major}-1'
# deb package
ondemand-release-web:
- '{major}.0'

# web
cjose:
Expand All @@ -34,15 +37,15 @@ ondemand-nginx:
- ondemand-nginx
- ondemand-nginx-debuginfo
versions:
- 1.18.0-2.p6.0.7
- 1.20.1-1.p6.0.11
ondemand-passenger:
packages:
- ondemand-passenger
- ondemand-passenger-debuginfo
- ondemand-passenger-devel
- ondemand-passenger-doc
versions:
- 6.0.7-1
- 6.0.11-1
ondemand-runtime:
packages:
- ondemand-apache
Expand Down

0 comments on commit d882b84

Please sign in to comment.