From 1db647b1ecb6af2f819e97d5ae98e4d916ab2b5a Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Thu, 22 Sep 2016 12:55:20 +0200 Subject: [PATCH] fedfix --- pcs/pcs | 2 +- pcsd/Makefile | 18 +++--------------- pcsd/pcsd.rb | 1 + pcsd/pcsd.service-runner | 3 ++- pcsd/session.rb | 1 + pcsd/ssl.rb | 1 + 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/pcs/pcs b/pcs/pcs index 4585fd5..d35933e 100755 --- a/pcs/pcs +++ b/pcs/pcs @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import import os.path diff --git a/pcsd/Makefile b/pcsd/Makefile index 9a4a4ba..4fd3786 100644 --- a/pcsd/Makefile +++ b/pcsd/Makefile @@ -1,21 +1,9 @@ -build_gems: get_gems - bundle install --local --deployment - -# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7 -# also bundler is not available on RHEL6 in rpm -build_gems_rhel6: +build_gems: mkdir -p vendor/bundle/ruby - gem install --verbose --no-rdoc --no-ri -l -i vendor/bundle/ruby \ - vendor/cache/backports-3.6.8.gem \ - vendor/cache/json-1.8.3.gem \ - vendor/cache/multi_json-1.12.0.gem \ - vendor/cache/open4-1.3.4.gem \ + gem install --force --verbose --no-rdoc --no-ri -l -i vendor/bundle/ruby \ vendor/cache/orderedhash-0.0.6.gem \ vendor/cache/rack-1.6.4.gem \ - vendor/cache/rack-protection-1.5.3.gem \ - vendor/cache/rack-test-0.6.3.gem \ - vendor/cache/rpam-ruby19-feist-1.2.1.1.gem \ - vendor/cache/tilt-2.0.3.gem \ + vendor/cache/rpam-ruby19-1.2.1.gem \ vendor/cache/sinatra-1.4.7.gem \ vendor/cache/sinatra-contrib-1.4.7.gem \ -- '--with-ldflags="-Wl,-z,now -Wl,-z,relro"' diff --git a/pcsd/pcsd.rb b/pcsd/pcsd.rb index dcfd5a0..adc8dc2 100644 --- a/pcsd/pcsd.rb +++ b/pcsd/pcsd.rb @@ -1,3 +1,4 @@ +gem 'sinatra', '= 1.4.7' require 'sinatra' require 'sinatra/reloader' if development? require 'sinatra/cookies' diff --git a/pcsd/pcsd.service-runner b/pcsd/pcsd.service-runner index 883d290..712913e 100644 --- a/pcsd/pcsd.service-runner +++ b/pcsd/pcsd.service-runner @@ -3,8 +3,9 @@ # it also serves as a holder of a selinux context begin - # add pcsd to the load path (ruby -I) + # add pcsd and bundled gems to the load path (ruby -I) libdir = File.dirname(__FILE__) + $LOAD_PATH.unshift(*Dir[libdir + '/vendor/bundle/ruby/gems/*/lib']) $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) # change current directory (ruby -C) diff --git a/pcsd/session.rb b/pcsd/session.rb index c54a493..79f305d 100644 --- a/pcsd/session.rb +++ b/pcsd/session.rb @@ -1,3 +1,4 @@ +gem 'rack', '= 1.6.4' require 'rack/session/pool' class SessionPoolLifetime < Rack::Session::Pool diff --git a/pcsd/ssl.rb b/pcsd/ssl.rb index 7bbff46..c4f5a90 100644 --- a/pcsd/ssl.rb +++ b/pcsd/ssl.rb @@ -1,4 +1,5 @@ require 'rubygems' +gem 'rack', '= 1.6.4' require 'webrick' require 'webrick/https' require 'openssl' -- 2.9.3