rpms/glpi/F-8 glpi-config_path.php, 1.1, 1.2 glpi-httpd.conf, 1.1, 1.2 glpi.spec, 1.10, 1.11 sources, 1.9, 1.10 glpi.patch, 1.2, NONE

Remi Collet (remi) fedora-extras-commits at redhat.com
Sat Jul 12 07:37:43 UTC 2008


Author: remi

Update of /cvs/extras/rpms/glpi/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4401

Modified Files:
	glpi-config_path.php glpi-httpd.conf glpi.spec sources 
Removed Files:
	glpi.patch 
Log Message:
update to 0.71


Index: glpi-config_path.php
===================================================================
RCS file: /cvs/extras/rpms/glpi/F-8/glpi-config_path.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- glpi-config_path.php	9 Oct 2007 11:53:22 -0000	1.1
+++ glpi-config_path.php	12 Jul 2008 07:36:44 -0000	1.2
@@ -11,5 +11,6 @@
 define("GLPI_PLUGIN_DOC_DIR", "/var/lib/glpi/files/_plugins");
 define("GLPI_LOCK_DIR",       "/var/lib/glpi/files/_lock/");
 
+define("GLPI_CACHE_LITE_DIR", "Cache");
 define("GLPI_LOG_DIR",        "/var/log/glpi");
 ?>


Index: glpi-httpd.conf
===================================================================
RCS file: /cvs/extras/rpms/glpi/F-8/glpi-httpd.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- glpi-httpd.conf	9 Oct 2007 11:53:22 -0000	1.1
+++ glpi-httpd.conf	12 Jul 2008 07:36:44 -0000	1.2
@@ -4,6 +4,8 @@
     Options None
     AllowOverride Limit Options FileInfo
 
+    php_value memory_limit 64M
+
     Order Deny,Allow
     Allow from all
 </Directory>


Index: glpi.spec
===================================================================
RCS file: /cvs/extras/rpms/glpi/F-8/glpi.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- glpi.spec	28 Jan 2008 18:12:08 -0000	1.10
+++ glpi.spec	12 Jul 2008 07:36:44 -0000	1.11
@@ -1,12 +1,12 @@
-%if %{?fedora}%{?rhel} >= 6
+%if %{?fedora}%{?rhel} >= 5
 %define useselinux 1
 %else
 %define useselinux 0
 %endif
 
 Name:           glpi
-Version:        0.70.2
-Release:        2%{?dist}
+Version:        0.71
+Release:        1%{?dist}
 Summary:        Free IT asset management software
 Summary(fr):    Gestion Libre de Parc Informatique
 
@@ -27,6 +27,7 @@
 Requires:       php-domxml
 %else
 Requires:       php-xml
+Requires:       php-pear(Cache_Lite) >= 1.7.4
 %endif
 Requires:       %{_sysconfdir}/logrotate.d
 Requires(postun): /sbin/service
@@ -34,7 +35,6 @@
 BuildRequires:  dos2unix
 %if %{useselinux}
 Requires:       policycoreutils
-BuildRequires:  selinux-policy-devel, checkpolicy
 %endif
 
 %description
@@ -59,42 +59,28 @@
 %prep
 %setup -q -n glpi
 
+%if 0%{?rhel} == 4
+
+# use bundled lib
 mv lib/cache_lite/LICENSE   LICENSE.cache_lite
+grep -v GLPI_CACHE_LITE_DIR %{SOURCE2} >config/config_path.php 
+
+%else
+
+# Use system lib
+rm -rf lib/cache_lite
+cp %{SOURCE2} config/config_path.php 
+
+%endif
 mv lib/phpmailer/LICENSE    LICENSE.phpmailer
 mv lib/tiny_mce/license.txt LICENSE.tiny_mce
 dos2unix -o LICENSE.phpmailer LICENSE.tiny_mce
 iconv -f ISO-8859-15 -t UTF-8 LISEZMOI.txt >a && mv a LISEZMOI.txt
 iconv -f ISO-8859-15 -t UTF-8 README.txt   >a && mv a README.txt
 
-%if %{useselinux}
-mkdir selinux
-pushd selinux
-
-cat >%{name}.te <<EOF
-policy_module(%{name},0.70)
-require {
-  type httpd_sys_content_t;
-  type httpd_log_t;
-  type httpd_var_lib_t;
-}
-EOF
-
-cat >%{name}.fc <<EOF
-%{_sysconfdir}/%{name}(/.*)?          root:object_r:httpd_sys_content_t:s0
-%{_localstatedir}/log/%{name}(/.*)?   system_u:object_r:httpd_sys_content_t:s0
-%{_localstatedir}/lib/%{name}(/.*)?   system_u:object_r:httpd_sys_content_t:s0
-EOF
-popd
-%endif
-
 
 %build
-%if %{useselinux}
-# SElinux 
-pushd selinux
-make -f %{_datadir}/selinux/devel/Makefile
-popd
-%endif
+# empty build
 
 
 %install
@@ -117,7 +103,6 @@
 
 # ===== config =====
 cp -ar config %{buildroot}/%{_datadir}/%{name}/config
-install --mode 644 %{SOURCE2} %{buildroot}/%{_datadir}/%{name}/config/config_path.php
 
 mkdir -p %{buildroot}/%{_sysconfdir}/%{name}
 touch %{buildroot}%{_sysconfdir}/%{name}/config_db.php
@@ -144,11 +129,6 @@
 rm -f %{buildroot}%{_datadir}/%{name}/config/.htaccess
 rm -f %{buildroot}%{_datadir}/%{name}/scripts/.htaccess
 
-%if %{useselinux}
-# SElinux 
-mkdir -p %{buildroot}%{_datadir}/selinux/packages/%{name}
-install -m644 selinux/%{name}.pp %{buildroot}%{_datadir}/selinux/packages/%{name}/%{name}.pp
-%endif
 
 # Lang
 for i in %{buildroot}%{_datadir}/%{name}/locales/*
@@ -164,26 +144,37 @@
 
 %post
 %if %{useselinux}
-# Install/update Selinux policy
-semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp
-# files owned by RPM
-fixfiles -R %{name} restore
+(
+# Remove Selinux policy (from previous packaging)
+semodule -s targeted -r %{name} &>/dev/null
+# Remove old httpd_sys_script_rw_t
+semanage fcontext -d "%{_localstatedir}/log/glpi(/.*)?"
+# New File context
+semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_sysconfdir}/glpi(/.*)?" 
+semanage fcontext -a -s system_u -t httpd_log_t           -r s0 "%{_localstatedir}/log/glpi(/.*)?"
+# keep httpd_sys_script_rw_t (httpd_var_lib_t prevent dir creation)
+semanage fcontext -a -s system_u -t httpd_sys_script_rw_t -r s0 "%{_localstatedir}/lib/glpi(/.*)?"
 # files created by app
 restorecon -R %{_sysconfdir}/%{name}
 restorecon -R %{_localstatedir}/lib/%{name}
 restorecon -R %{_localstatedir}/log/%{name}
+) &>/dev/null
 %endif
 /sbin/service httpd condrestart > /dev/null 2>&1 || :
 
 
 %postun
-/sbin/service httpd condrestart > /dev/null 2>&1 || :
 %if %{useselinux}
 if [ "$1" -eq "0" ]; then
-    # Remove the SElinux policy.
-    semodule -r %{name} || :
+    # Remove the File Context
+    (
+    semanage fcontext -d "%{_sysconfdir}/glpi(/.*)?"
+    semanage fcontext -d "%{_localstatedir}/log/glpi(/.*)?"
+    semanage fcontext -d "%{_localstatedir}/lib/glpi(/.*)?"
+    ) &>/dev/null
 fi
 %endif
+/sbin/service httpd condrestart > /dev/null 2>&1 || :
 
 
 %files -f %{name}.lang
@@ -215,11 +206,15 @@
 %attr(750,apache,root) %dir %{_localstatedir}/log/%{name}
 %dir %{_datadir}/%{name}/locales
 
-%if %{useselinux}
-%{_datadir}/selinux/packages/%{name}/%{name}.pp
-%endif
 
 %changelog
+* Fri Jul 11 2008 Remi Collet <Fedora at FamilleCollet.com> - 0.71-1
+- update to 0.71 stable
+- fix bug #452353 (selinux)
+
+* Fri Apr 25 2008 Remi Collet <Fedora at FamilleCollet.com> - 0.70.2-3
+- remplace module policy by simple semanage (#442706)
+
 * Mon Jan 28 2008 Remi Collet <Fedora at FamilleCollet.com> - 0.70.2-2
 - rebuild (fix sources tarball)
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/glpi/F-8/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sources	28 Jan 2008 18:12:08 -0000	1.9
+++ sources	12 Jul 2008 07:36:44 -0000	1.10
@@ -1 +1 @@
-5e755472c887a54bc532569ec36add99  glpi-0.70.2.tar.gz
+9715471ac8e3be2a59f2888a180f26c2  glpi-0.71.tar.gz


--- glpi.patch DELETED ---




More information about the fedora-extras-commits mailing list