[ocsinventory] unbundled phpcas
Remi Collet
remi at fedoraproject.org
Sat Feb 25 14:43:04 UTC 2012
commit 3233798a45dbcfefaa2a373a35e53d134c8cf06c
Author: remi <fedora at famillecollet.com>
Date: Sat Feb 25 15:42:15 2012 +0100
unbundled phpcas
ocsinventory.spec | 21 +++++++++++++++++----
ocsng-systemcas.patch | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 4 deletions(-)
---
diff --git a/ocsinventory.spec b/ocsinventory.spec
index ef0f794..7366c42 100644
--- a/ocsinventory.spec
+++ b/ocsinventory.spec
@@ -12,7 +12,7 @@ Name: ocsinventory
Summary: Open Computer and Software Inventory Next Generation
Version: 2.0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Applications/Internet
License: GPLv2
@@ -22,6 +22,9 @@ URL: http://www.ocsinventory-ng.org/
Source0: http://launchpad.net/ocsinventory-server/stable-2.0/%{version}/+download/%{tarname}-%{version}.tar.gz
Source1: ocsinventory-reports.conf
+# Use system PHPCAS
+Patch0: ocsng-systemcas.patch
+
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::MakeMaker)
@@ -102,6 +105,7 @@ Summary: OCS Inventory NG - Communication server
# From phpci : curl, date, dom, imap, ldap, mysql, openssl, pcre, session, xml, zlib
Requires: php
Requires: php-mysql php-gd php-xml php-imap php-ldap php-mbstring
+Requires: php-pear-CAS
# Required by the original setup script, but not detected automatically :
Requires: perl(DBD::mysql)
# Required by ipdiscover-util.pl (nmap and nmblookup)
@@ -125,6 +129,8 @@ navigateur favori.
%prep
%setup -q -n %{tarname}-%{version}
+%patch0 -p0
+
chmod -x binutils/ocs-errors
cat >external-agents.conf <<EOF
@@ -140,6 +146,9 @@ cat >external-agents.conf <<EOF
#FusionInventory-Agent_v2.1.13
EOF
+# remvoe Bundled libs
+rm -rf ocsreports/backend/require/lib
+
%build
cd Apache
@@ -204,8 +213,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-reports
mv %{buildroot}%{_datadir}/ocsinventory-reports/ocsreports/dbconfig.inc.php \
%{buildroot}%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php
-sed -i -e '/CONF_MYSQL/s;dbconfig.inc.php;%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php;' \
- %{buildroot}%{_datadir}/ocsinventory-reports/ocsreports/var.php
+sed -e '/CONF_MYSQL/s;dbconfig.inc.php;%{_sysconfdir}/ocsinventory/ocsinventory-reports/dbconfig.inc.php;' \
+ -e '/PHPCAS/s/^.*$/define("PHPCAS", "CAS.php");/' \
+ -i %{buildroot}%{_datadir}/ocsinventory-reports/ocsreports/var.php
mkdir -p %{buildroot}%{_localstatedir}/lib/ocsinventory-reports/{download,ipd,snmp}
mkdir -p %{buildroot}%{_bindir}
@@ -308,7 +318,10 @@ fi
%changelog
-* Mon Feb 13 2012 Remi Collet <remi at fedoraproject.org> - 2.0.4-2
+* Sat Feb 25 2012 Remi Collet <remi at fedoraproject.org> - 2.0.4-2
+- unbundled phpcas
+
+* Mon Feb 13 2012 Remi Collet <remi at fedoraproject.org> - 2.0.4-1
- update to 2.0.4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.3-6
diff --git a/ocsng-systemcas.patch b/ocsng-systemcas.patch
new file mode 100644
index 0000000..13e12df
--- /dev/null
+++ b/ocsng-systemcas.patch
@@ -0,0 +1,35 @@
+diff -up ocsreports/backend/AUTH/methode/cas.php.cas ocsreports/backend/AUTH/methode/cas.php
+--- ocsreports/backend/AUTH/methode/cas.php.cas 2012-02-25 15:15:04.596084878 +0100
++++ ocsreports/backend/AUTH/methode/cas.php 2012-02-25 15:15:19.498084302 +0100
+@@ -10,7 +10,7 @@
+ //====================================================================================
+
+
+-require_once(BACKEND.'require/lib/phpcas/CAS.php');
++require_once(PHPCAS);
+ require_once(BACKEND.'require/cas.config.php');
+ $cas=new phpCas();
+ $cas->client(CAS_VERSION_2_0,$cas_host,$cas_port,$cas_uri);
+diff -up ocsreports/require/header.php.cas ocsreports/require/header.php
+--- ocsreports/require/header.php.cas 2012-02-25 15:14:47.922083791 +0100
++++ ocsreports/require/header.php 2012-02-25 15:15:48.825085006 +0100
+@@ -60,7 +60,7 @@ if ($_POST['RELOAD_CONF'] == 'RELOAD'){
+ if (isset($_POST['LOGOUT']) and $_POST['LOGOUT'] == 'ON'){
+ //Contrib of FranciX (http://forums.ocsinventory-ng.org/viewtopic.php?pid=41923#p41923)
+ if($_SESSION['OCS']['cnx_origine'] == "CAS"){
+- require_once(BACKEND.'require/lib/phpcas/CAS.php');
++ require_once(PHPCAS);
+ require_once(BACKEND.'require/cas.config.php');
+ $cas=new phpCas();
+ $cas->client(CAS_VERSION_2_0,$cas_host,$cas_port,$cas_uri);
+diff -up ocsreports/var.php.cas ocsreports/var.php
+--- ocsreports/var.php.cas 2012-02-25 15:11:11.825078326 +0100
++++ ocsreports/var.php 2012-02-25 15:17:49.050087883 +0100
+@@ -23,6 +23,7 @@ define("DFT_DB_PSWD",'ocs'); /
+ define("DFT_GUI_CMPT",'admin'); // Define default login to connect to GUI
+ define("DFT_GUI_PSWD",'admin'); // Define default password to connect to GUI
+ define('BACKEND',"backend/"); // Define backend Directory
++define('PHPCAS',BACKEND.'require/lib/phpcas/CAS.php'); // Path to CAS (change to use system provided library)
+ define('PLUGINS_DIR',"plugins/"); // Define plugins Directory
+ define('CONF_MYSQL',"dbconfig.inc.php"); // Define dbconf file
+ define('HEADER_HTML',"require/html_header.php"); // Define html_header file
More information about the scm-commits
mailing list