Re-synced to upstream sources

This commit is contained in:
Tomas Jelinek 2015-06-05 14:39:48 +02:00
parent 72637d984b
commit 21e433bdbf
5 changed files with 99 additions and 75 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@
/pcs-withgems-0.9.102.tar.gz
/pcs-withgems-0.9.115.tar.gz
/pcs-withgems-0.9.139.tar.gz
/pcs-withgems-0.9.140.tar.gz

View File

@ -1,47 +1,31 @@
--- pcs-0.9.139/Makefile.fedfix
+++ pcs-0.9.139/Makefile
@@ -8,14 +8,7 @@ ifeq ($(PYTHON_SITELIB), /usr/lib/python2.7/dist-packages)
EXTRA_SETUP_OPTS="--install-layout=deb"
endif
-IS_SYSTEMCTL=false
-ifeq ("$(wildcard /usr/bin/systemctl)","/usr/bin/systemctl")
- IS_SYSTEMCTL=true
-else
- ifeq ("$(wildcard /bin/systemctl)","/usr/bin/systemctl")
- IS_SYSTEMCTL=true
- endif
-endif
+IS_SYSTEMCTL=true
MANDIR=/usr/share/man
--- pcs-0.9.102/pcsd/Makefile.fedfix 2013-12-13 17:59:47.983000261 -0600
+++ pcs-0.9.102/pcsd/Makefile 2013-12-13 17:59:57.709889020 -0600
@@ -7,7 +7,7 @@ else
endif
build_gems_normal:
- bundle install --local --deployment
+ bundle install --local --path vendor/bundle
# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7
build_gems_rhel6:
--- pcs-0.9.102/pcsd/Gemfile.fedfix 2013-12-04 17:59:26.000000000 -0600
+++ pcs-0.9.102/pcsd/Gemfile 2013-12-13 17:58:57.063583063 -0600
From 43b366e92113c63926fd372e081bb633cee3ba31 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Fri, 5 Jun 2015 14:29:03 +0200
Subject: [PATCH] fedfix patch
---
pcsd/Gemfile | 16 ++++++++--------
pcsd/Gemfile.lock | 10 ----------
pcsd/Makefile | 2 +-
pcsd/pcsd.conf | 1 +
pcsd/pcsd.rb | 22 ++++++++++++----------
5 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/pcsd/Gemfile b/pcsd/Gemfile
index db98546..3658683 100644
--- a/pcsd/Gemfile
+++ b/pcsd/Gemfile
@@ -1,16 +1,16 @@
source 'https://rubygems.org'
-gem 'sinatra'
+#gem 'sinatra'
gem 'sinatra-contrib'
-gem 'highline'
-gem 'rack'
-gem 'rack-protection'
-gem 'tilt'
-gem 'eventmachine'
-gem 'rack-test'
+#gem 'highline'
+#gem 'rack'
+#gem 'rack-protection'
+#gem 'tilt'
@ -55,30 +39,32 @@
-gem 'open4'
+#gem 'multi_json'
+#gem 'open4'
--- pcs-0.9.102/pcsd/Gemfile.lock.fedfix
+++ pcs-0.9.102/pcsd/Gemfile.lock
@@ -2,12 +2,9 @@ GEM
gem 'orderedhash'
diff --git a/pcsd/Gemfile.lock b/pcsd/Gemfile.lock
index 6eb3d03..af1d77a 100644
--- a/pcsd/Gemfile.lock
+++ b/pcsd/Gemfile.lock
@@ -2,11 +2,9 @@ GEM
remote: https://rubygems.org/
specs:
backports (3.6.4)
- eventmachine (1.0.3)
- highline (1.6.20)
- eventmachine (1.0.7)
monkey-lib (0.5.4)
backports
multi_json (1.10.1)
multi_json (1.11.0)
- open4 (1.3.4)
rack (1.5.2)
orderedhash (0.0.6)
rack (1.5.3)
rack-protection (1.5.3)
rack
@@ -35,16 +32,7 @@ PLATFORMS
@@ -35,16 +33,8 @@ PLATFORMS
DEPENDENCIES
backports
- eventmachine
- highline
monkey-lib
- multi_json
- open4
orderedhash
- rack
- rack-protection
- rack-test
@ -87,3 +73,61 @@
sinatra-contrib
sinatra-sugar
- tilt
diff --git a/pcsd/Makefile b/pcsd/Makefile
index 0d28b58..d320162 100644
--- a/pcsd/Makefile
+++ b/pcsd/Makefile
@@ -7,7 +7,7 @@ else
endif
build_gems_normal:
- bundle install --local --deployment
+ bundle install --local --path vendor/bundle
# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7
build_gems_rhel6:
diff --git a/pcsd/pcsd.conf b/pcsd/pcsd.conf
index 69c4022..f596d59 100644
--- a/pcsd/pcsd.conf
+++ b/pcsd/pcsd.conf
@@ -1,3 +1,4 @@
# pcsd configuration file
# Set PCSD_DEBUG to true for advanced pcsd debugging information
PCSD_DEBUG=false
+RACK_ENV=production
diff --git a/pcsd/pcsd.rb b/pcsd/pcsd.rb
index 82d3fcd..bb137a4 100644
--- a/pcsd/pcsd.rb
+++ b/pcsd/pcsd.rb
@@ -39,16 +39,18 @@ use Rack::Session::Cookie,
#use Rack::SSL
-Dir["wizards/*.rb"].each {|file| also_reload file}
-also_reload 'resource.rb'
-also_reload 'remote.rb'
-also_reload 'fenceagent.rb'
-also_reload 'cluster.rb'
-also_reload 'config.rb'
-also_reload 'pcs.rb'
-also_reload 'auth.rb'
-also_reload 'wizard.rb'
-also_reload 'cfgsync.rb'
+if development?
+ Dir["wizards/*.rb"].each {|file| also_reload file}
+ also_reload 'resource.rb'
+ also_reload 'remote.rb'
+ also_reload 'fenceagent.rb'
+ also_reload 'cluster.rb'
+ also_reload 'config.rb'
+ also_reload 'pcs.rb'
+ also_reload 'auth.rb'
+ also_reload 'wizard.rb'
+ also_reload 'cfgsync.rb'
+end
before do
$session = session
--
1.9.1

View File

@ -1,21 +1,20 @@
Name: pcs
Version: 0.9.139
Release: 4%{?dist}
Version: 0.9.140
Release: 1%{?dist}
License: GPLv2
URL: http://github.com/feist/pcs
Group: System Environment/Base
BuildRequires: python2-devel ruby ruby-devel pam-devel python rubygem-bundler
BuildRequires: rubygem-sinatra rubygem-highline rubygem-rack rubygem-rack-protection rubygem-tilt
BuildRequires: rubygem-sinatra rubygem-rack rubygem-rack-protection rubygem-tilt
BuildRequires: rubygem-eventmachine rubygem-rack-test rubygem-multi_json rubygem-json rubygem-open4
# for post, preun and postun macros
BuildRequires: systemd
Summary: Pacemaker Configuration System
Source0: http://people.redhat.com/cfeist/pcs/pcs-withgems-%{version}.tar.gz
Source0: https://tojeline.fedorapeople.org/pkgs/pcs/pcs-withgems-%{version}.tar.gz
Patch0: fedfix.patch
Patch1: secure-cookie.patch
Requires: pacemaker ruby python
Requires: python-clufter
Requires: rubygem-sinatra rubygem-highline rubygem-rack rubygem-rack-protection rubygem-tilt
Requires: rubygem-sinatra rubygem-rack rubygem-rack-protection rubygem-tilt
Requires: rubygem-eventmachine rubygem-rack-test rubygem-multi_json rubygem-json rubygem-open4
%description
@ -25,8 +24,7 @@ easily view, modify and created pacemaker based clusters.
%prep
%setup -q
%patch0 -p1 -b .fedfix
%patch1 -p1 -b .fedfix
%patch0 -p1
cd pcsd ; bundle install --local ; cd ..
%build
@ -57,7 +55,6 @@ chmod 755 $RPM_BUILD_ROOT/%{python_sitelib}/pcs/pcs.py
/usr/sbin/pcs
/usr/lib/pcsd/*
/usr/lib/pcsd/.bundle/config
/usr/lib/pcsd/.gitignore
/usr/lib/systemd/system/pcsd.service
/var/lib/pcsd
/etc/pam.d/pcsd
@ -66,10 +63,14 @@ chmod 755 $RPM_BUILD_ROOT/%{python_sitelib}/pcs/pcs.py
%dir /var/log/pcsd
/etc/sysconfig/pcsd
%{_mandir}/man8/pcs.*
%exclude /usr/lib/pcsd/*.debian
%doc COPYING README
%changelog
* Fri Jun 05 2015 Tomas Jelinek <tojeline@redhat.com> - 0.9.140-1
- Re-synced to upstream sources
* Fri May 22 2015 Tomas Jelinek <tojeline@redhat.com> - 0.9.139-4
- Fix for CVE-2015-1848, CVE-2015-3983 (sessions not signed)

View File

@ -1,22 +0,0 @@
--- pcs-0.9.137/pcsd/pcsd.rb.secure_fix 2015-03-30 13:48:50.209887370 -0500
+++ pcs-0.9.137/pcsd/pcsd.rb 2015-03-30 13:50:47.321660377 -0500
@@ -31,7 +31,9 @@ end
use Rack::Session::Cookie,
:expire_after => 60 * 60,
- :secret => secret
+ :secret => secret,
+ :secure => true, # only send over HTTPS
+ :httponly => true # don't provide to javascript
#use Rack::SSL
@@ -45,8 +47,6 @@ also_reload 'pcs.rb'
also_reload 'auth.rb'
also_reload 'wizard.rb'
-enable :sessions
-
before do
$session = session
$cookies = cookies

View File

@ -1 +1 @@
4a7840c015d8f7a9a7eb5e4b01ee1b3a pcs-withgems-0.9.139.tar.gz
fc12a37fa7788dcc930e038c87a05264 pcs-withgems-0.9.140.tar.gz