Skip to content

Commit

Permalink
Vendor gems (#138)
Browse files Browse the repository at this point in the history
* vendor/bundle gems and rm dependency on ondemand-gems

* rm this from files as well
  • Loading branch information
johrstrom authored Feb 7, 2024
1 parent 5c7c722 commit 64d59a5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packaging/frame_renderer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
%global debug_package %{nil}
%global repo_name frame-renderer
%global app_name frame-renderer
%define ondemand_gems_ver %(rpm --qf "%%{version}-%%{release}" -q ondemand-gems | sed -r 's/.el.+//g')
%global gem_home %{scl_ondemand_apps_gem_home}/%{app_name}

%{!?package_release: %define package_release 1}
%{!?git_tag: %define git_tag v%{package_version}}
Expand All @@ -26,9 +24,8 @@ BuildRequires: ondemand-runtime
BuildRequires: ondemand-ruby
BuildRequires: ondemand-nodejs
BuildRequires: ondemand-scldevel
BuildRequires: ondemand-gems
Requires: ondemand
Requires: ondemand-gems-%{ondemand_gems_ver}


# Disable automatic dependencies as it causes issues with bundled gems and
# node.js packages used in the apps
Expand All @@ -43,17 +40,13 @@ DESCRIPTION

%build
scl enable ondemand - << \EOS
export GEM_HOME=$(pwd)/gems-build
export GEM_PATH=$(pwd)/gems-build:$GEM_PATH
bundle config path --local vendor/bundle
export PASSENGER_APP_ENV=production
export SECRET_KEY_BASE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1)
bin/setup
EOS

%install
%__mkdir_p %{buildroot}%{gem_home}
%__mv ./gems-build/* %{buildroot}%{gem_home}/

%__rm ./log/production.log
%__mkdir_p %{buildroot}%{_localstatedir}/www/ood/apps/sys/%{app_name}
%__cp -a ./. %{buildroot}%{_localstatedir}/www/ood/apps/sys/%{app_name}/
Expand Down Expand Up @@ -91,7 +84,6 @@ touch %{_localstatedir}/www/ood/apps/sys/%{app_name}/tmp/restart.txt

%files
%defattr(-,root,root)
%{gem_home}
%{_localstatedir}/www/ood/apps/sys/%{app_name}
%{_localstatedir}/www/ood/apps/sys/%{app_name}/manifest.yml
%ghost %{_localstatedir}/www/ood/apps/sys/%{app_name}/tmp/restart.txt
Expand Down

0 comments on commit 64d59a5

Please sign in to comment.