rpms/awstats/EL-5 .cvsignore, 1.6, 1.7 awstats.spec, 1.18, 1.19 sources, 1.10, 1.11
Tim Jackson (timj)
fedora-extras-commits at redhat.com
Tue Sep 18 09:56:15 UTC 2007
Author: timj
Update of /cvs/extras/rpms/awstats/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1914
Modified Files:
.cvsignore awstats.spec sources
Log Message:
Bring up to latest version (sync'd with Fedora devel) before initial build for EL-5
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/awstats/EL-5/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 7 May 2006 08:17:10 -0000 1.6
+++ .cvsignore 18 Sep 2007 09:55:42 -0000 1.7
@@ -1 +1,2 @@
awstats-6.6.tar.gz
+awstats-6.7-xmlhistory.patch
Index: awstats.spec
===================================================================
RCS file: /cvs/extras/rpms/awstats/EL-5/awstats.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- awstats.spec 7 Jan 2007 21:24:41 -0000 1.18
+++ awstats.spec 18 Sep 2007 09:55:42 -0000 1.19
@@ -1,19 +1,25 @@
Name: awstats
-Version: 6.6
+Version: 6.7
Release: 1%{?dist}
Summary: Advanced Web Statistics
-License: GPL
+License: GPLv2
Group: Applications/Internet
URL: http://awstats.sourceforge.net
-Source0: http://dl.sf.net/awstats/awstats-6.6.tar.gz
+Source0: http://dl.sf.net/awstats/awstats-%{version}.tar.gz
#Source0: http://awstats.sourceforge.net/files/awstats-6.6.tar.gz
Source1: awstats.README.SELinux
+
+# Fix pb in xml output for history files
+# http://awstats.cvs.sourceforge.net/awstats/awstats/wwwroot/cgi-bin/awstats.pl?r1=1.892&r2=1.894&view=patch
+Patch0: awstats-6.7-xmlhistory.patch
+
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: checkpolicy, selinux-policy-devel
Requires: httpd
Requires: perl
-Requires(post): perl, policycoreutils
-Requires(postun): /sbin/service, policycoreutils
+Requires(post): perl
+Requires(postun): /sbin/service
%description
Advanced Web Statistics is a powerful and featureful tool that generates
@@ -31,9 +37,23 @@
With the default configuration, the statistics are available:
http://localhost/awstats/awstats.pl
+%package selinux
+Summary: SELinux support for Awstats
+Group: Applications/Internet
+Requires: %{name} = %{version}
+Requires(post): policycoreutils
+Requires(preun): policycoreutils
+Requires(postun): policycoreutils
+
+%description selinux
+This package adds SELinux enforcement to AWstats.
+
%prep
%setup -q
+# No backup or it will be installed
+#%%patch0 -p0 -b .xmlhistory
+%patch0 -p0
# Fix style sheets.
perl -pi -e 's,/icon,/awstatsicons,g' wwwroot/css/*
# Fix some bad file permissions here for convenience.
@@ -43,6 +63,7 @@
perl -pi -e 's/\r//g' tools/httpd_conf tools/logresolvemerge.pl
# SELinux README
cp -a %{SOURCE1} README.SELinux
+mkdir selinux
%install
@@ -111,6 +132,15 @@
# Cron job
install -m 0755 awstats.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/%{name}
+# SELinux support
+cd selinux
+echo 'policy_module(%{name}, 1.0)' > %{name}.te
+echo '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_exec_t:s0' > %{name}.fc
+echo '%{_localstatedir}/lib/awstats(/.*)? system_u:object_r:httpd_sys_script_rw_t:s0' >> %{name}.fc
+touch %{name}.if
+make -f %{_datadir}/selinux/devel/Makefile
+install -p -m 644 -D %{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/%{name}.pp
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -125,27 +155,29 @@
' > %{_sysconfdir}/%{name}/%{name}.`hostname`.conf || :
fi
fi
-### SELinux support ###
-# Set SELinux file_context
-semanage fcontext -a -t httpd_sys_script_exec_t \
- '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)?' 2>/dev/null || :
-semanage fcontext -a -t httpd_sys_script_rw_t '%{_localstatedir}/lib/awstats(/.*)?' 2>/dev/null || :
-# Actually change the context
-chcon -R -t httpd_sys_script_exec_t %{_datadir}/awstats/wwwroot/cgi-bin || :
-chcon -R -t httpd_sys_script_rw_t %{_localstatedir}/lib/awstats || :
-
%postun
if [ $1 -ne 0 ]; then
/sbin/service httpd condrestart >/dev/null 2>&1
fi
-# SELinux support
-if [ $1 -eq 0 ]; then
- semanage fcontext -d -t httpd_sys_script_exec_t \
- '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)?' 2>/dev/null || :
- semanage fcontext -d -t httpd_sys_script_rw_t '%{_localstatedir}/lib/awstats(/.*)?' 2>/dev/null || :
+
+%post selinux
+if [ "$1" -le "1" ]; then # Fist install
+ semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || :
+ fixfiles -R %{name} restore
+fi
+
+%preun selinux
+if [ "$1" -lt "1" ]; then # Final removal
+ semodule -r %{name} 2>/dev/null || :
+ fixfiles -R %{name} restore
fi
+%postun selinux
+if [ "$1" -ge "1" ]; then # Upgrade
+ # Replaces the module if it is already loaded
+ semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || :
+fi
%files
@@ -161,7 +193,7 @@
%{_datadir}/%{name}/wwwroot/cgi-bin
# Different defattr to fix lots of files which should not be +x.
%defattr(644,root,root,755)
-%doc README.TXT docs/* README.SELinux
+%doc README.TXT docs/*
%{_datadir}/%{name}/lang
%{_datadir}/%{name}/lib
%{_datadir}/%{name}/plugins
@@ -171,111 +203,12 @@
%{_datadir}/%{name}/wwwroot/js
+%files selinux
+%defattr(644, root, root, 755)
+%doc README.SELinux
+%{_datadir}/selinux/packages/%{name}/%{name}.pp
-%changelog
-* Sun Jan 07 2007 Aurelien Bompard <abompard at fedoraproject.org> 6.6-1
-- version 6.6 final
-
-* Fri Nov 03 2006 Aurelien Bompard <abompard at fedoraproject.org> 6.6-0.4.beta
-- fix typo in the cron job (bug 213803)
-* Mon Oct 30 2006 Aurelien Bompard <abompard at fedoraproject.org> 6.6-0.3.beta
-- fix DOS encoding on logresolvemerge.pl
-
-* Wed Aug 30 2006 Aurelien Bompard <abompard at fedoraproject.org> 6.6-0.2.beta
-- rebuild
-
-* Sun May 07 2006 Aurelien Bompard <gauret[AT]free.fr> 6.6-0.1.beta
-- version 6.6 (beta), fixes CVE-2005-2732 (bug 190921, 190922, and 190923)
-
-* Sun Apr 09 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-3
-- SELinux support: use semanage to label the cgi and the database files
-- Only allow access from localhost by default (this app has a security history)
-
-* Thu Feb 23 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-2
-- rebuild for FC5
-
-* Wed Jan 11 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-1
-- version 6.5 final
-
-* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 6.5-1
-- version 6.5 (beta), fixes CAN-2005-1527
-
-* Mon Mar 21 2005 Aurelien Bompard <gauret[AT]free.fr> 6.4-1
-- version 6.4 final
-- change release tag (following Owen's scheme)
-- convert tabs into spaces
-
-* Tue Feb 15 2005 Aurelien Bompard <gauret[AT]free.fr> 6.4-0.1.pre
-- update to 6.4pre to fix a vulnerability
-
-* Thu Feb 10 2005 Aurelien Bompard <gauret[AT]free.fr> 6.3-1
-- version 6.3 final
-
-* Thu Jan 27 2005 Aurelien Bompard <gauret[AT]free.fr> 6.3-0.1.20050122
-- update to 6.3pre to fix vulnerability
-
-* Sun Nov 28 2004 Aurelien Bompard <gauret[AT]free.fr> 6.2-0.fdr.1
-- version 6.2
-
-* Thu May 20 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.6
-- remove redundant substitution
-
-* Thu May 20 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.5
-- be closer to upstream default configuration
-- use the included apache conf file
-- merge changes from Michael Schwendt (bug 1608)
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.4
-- fix cron job for relocated tools
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.3
-- keep the tools in the tools subdirectory
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.2
-- fix scripts in /usr/bin
-- rename configure.pl to awstats_configure.pl
-
-* Sun May 16 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.1
-- version 6.1
-
-* Wed Mar 03 2004 Aurelien Bompard <gauret[AT]free.fr> 6.0.0.fdr.2
-- requires perl without version to fix build on rh9
-
-* Tue Feb 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.0-0.fdr.1
-- version 6.0
-
-* Mon Dec 22 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.5
-- solve stupid bug in %%install
-- only create the preconfigured config file on install, not on upgrade
-
-* Mon Dec 22 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.4
-- post scriptlet doesn't overwrite user configuration now
- be careful if you upgrade from 5.9-0.fdr.3
-- replace _DATADIR in apache configuration in the install stage
- (was in the post scriptlet before)
-- remove 'noreplace' tag from the apache config file
-- various cleanups in the %%install stage
-- Thanks to Mickael Schwendt.
-
-* Sun Dec 07 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.3
-- %%post et %%postun now use condrestart instead of restart
-- only restart apache if we are upgrading
-- install and cp use the "-p" switch
-- use %%_datadir in /etc/httpd/conf.d/awstats.conf
-- improve cron job
-- don't brutally recode HTML pages
-- the scan is now done hourly instead of daily
-- *.pm files are not executable any more
-- tools are in %%bindir
-- various other improvements
-- many thanks to Michael Schwendt and Dag Wieers.
-
-* Sat Nov 29 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.2
-- Set the hostname in %%post (thanks to Michael Koziarski)
-- Improved customization in %%post
-
-* Sun Nov 16 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.1
-- fix /etc/cron.daily/awstats permissions
-- fix log name in conf file
-- port to fedora (from Mandrake)
+%changelog
+* Tue Sep 18 2007 Tim Jackson <rpm at timj.co.uk> 6.7-1
+- initial import to EPEL-5, from Fedora
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/awstats/EL-5/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources 7 Jan 2007 21:24:41 -0000 1.10
+++ sources 18 Sep 2007 09:55:42 -0000 1.11
@@ -1 +1,2 @@
-38e393edb530d409fdf7f79127a7548e awstats-6.6.tar.gz
+512cd146247eb178ef023c924f7bb766 awstats-6.7.tar.gz
+cbf319b3472a022cd2452d612ac28117 awstats-6.7-xmlhistory.patch
More information about the scm-commits
mailing list