rpms/awstats/devel awstats.README.SELinux, 1.1, 1.2 awstats.spec, 1.21, 1.22
Aurelien Bompard (abompard)
fedora-extras-commits at redhat.com
Sat Mar 15 15:03:47 UTC 2008
- Previous message (by thread): rpms/awstats/F-8 awstats.README.SELinux, 1.1, 1.2 awstats.spec, 1.21, 1.22
- Next message (by thread): rpms/gnome-build/F-7 gnome-build-0.2.4-configure.patch, NONE, 1.1 gnome-build-0.2.4-pkgconfig.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 gnome-build.spec, 1.9, 1.10 sources, 1.4, 1.5 gnome-build-0.2.1-configure.patch, 1.1, NONE gnome-build-0.2.1-pkgconfig.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: abompard
Update of /cvs/pkgs/rpms/awstats/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6451/devel
Modified Files:
awstats.README.SELinux awstats.spec
Log Message:
* Fri Mar 14 2008 Aurelien Bompard <abompard at fedoraproject.org> 6.7-3
- SELinux policy is included upstream
- Fix cron job (bug 435101)
Index: awstats.README.SELinux
===================================================================
RCS file: /cvs/pkgs/rpms/awstats/devel/awstats.README.SELinux,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- awstats.README.SELinux 12 Apr 2006 19:16:45 -0000 1.1
+++ awstats.README.SELinux 15 Mar 2008 15:03:04 -0000 1.2
@@ -2,34 +2,7 @@
SELinux support in AWStats
==========================
-
-What is the problem ?
----------------------
-
-AWStats is a CGI script, and needs to be labelled correctly to be called
-from Apache.
-The files in ``/usr/share/awstats/wwwroot/cgi-bin`` need to have the
-``httpd_sys_script_exec_t`` type, and the databases files in
-``/var/lib/awstats`` need to have the ``httpd_sys_script_rw_t`` type.
-
-
-How do we solve it ?
---------------------
-
-You can change the type with the ``chcon`` command::
-
- chcon -R -t httpd_sys_script_exec_t /usr/share/awstats/wwwroot/cgi-bin
- chcon -R -t httpd_sys_script_rw_t /var/lib/awstats
-
-But these modifications will be lost if the system is relabeled (you can
-request a relabel with the system-config-security tool).
-
-To make these changes permanent, this package sets the contexts by running
-the following commands::
-
- semanage fcontext -a -t httpd_sys_script_exec_t \
- '/usr/share/awstats/wwwroot/cgi-bin(/.*)?'
- semanage fcontext -a -t httpd_sys_script_rw_t '/var/lib/awstats(/.*)?'
-
-
-Please send your bug reports (if any ;) ) to https://bugzilla.redhat.com
+SELinux support for AWStats used to be provided by this package, but is now
+included in the main SELinux policy. This package is only there to help you
+move to the upstream module.
+You can now safely remove it
Index: awstats.spec
===================================================================
RCS file: /cvs/pkgs/rpms/awstats/devel/awstats.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- awstats.spec 2 Dec 2007 17:01:51 -0000 1.21
+++ awstats.spec 15 Mar 2008 15:03:04 -0000 1.22
@@ -1,6 +1,6 @@
Name: awstats
Version: 6.7
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Advanced Web Statistics
License: GPLv2
Group: Applications/Internet
@@ -15,11 +15,15 @@
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: checkpolicy, selinux-policy-devel
Requires: perl
Requires(post): perl
Requires(postun): /sbin/service
+## SELinux policy is now included upstream
+#Obsoletes: awstats-selinux <= 6.7-2
+#Provides: awstats-selinux = %{version}-%{release}
+
+
%description
Advanced Web Statistics is a powerful and featureful tool that generates
advanced web server graphic statistics. This server log analyzer works
@@ -36,16 +40,15 @@
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
+Requires(postun): policycoreutils, selinux-policy
%description selinux
-This package adds SELinux enforcement to AWstats.
+This package helps moving to the upstream SELinux module.
%prep
@@ -62,7 +65,6 @@
perl -pi -e 's/\r//g' tools/httpd_conf tools/logresolvemerge.pl
# SELinux README
cp -a %{SOURCE1} README.SELinux
-mkdir selinux
%install
@@ -71,12 +73,9 @@
### Create cron job
cat <<EOF >awstats.cron
#!/bin/bash
-
-if [ -f %{_localstatedir}/log/httpd/access_log ] ; then
- exec perl %{_datadir}/awstats/tools/awstats_updateall.pl now \
- -configdir="%{_sysconfdir}/awstats" \
- -awstatsprog="%{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null
-fi
+exec %{_datadir}/awstats/tools/awstats_updateall.pl now \
+ -configdir="%{_sysconfdir}/awstats" \
+ -awstatsprog="%{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null
exit 0
EOF
@@ -131,15 +130,6 @@
# 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
@@ -161,28 +151,21 @@
fi
%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 || :
+if selinuxenabled; then
+ # Replace the module by the upstream one
+ . /etc/selinux/config 2>/dev/null || :
+ semodule -i %{_datadir}/selinux/$SELINUXTYPE/%{name}.pp 2>/dev/null || :
+ # relabel files
+ fixfiles -R %{name} restore || :
+ # relabel data
+ restorecon -R %{_localstatedir}/lib/%{name} || :
fi
%files
%defattr(-,root,root,755)
# Apache configuration file
-%config %{_sysconfdir}/httpd/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/cron.hourly/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/
%{_localstatedir}/lib/%{name}
@@ -201,14 +184,16 @@
%{_datadir}/%{name}/wwwroot/icon
%{_datadir}/%{name}/wwwroot/js
-
%files selinux
%defattr(644, root, root, 755)
%doc README.SELinux
-%{_datadir}/selinux/packages/%{name}/%{name}.pp
%changelog
+* Fri Mar 14 2008 Aurelien Bompard <abompard at fedoraproject.org> 6.7-3
+- SELinux policy is included upstream
+- Fix cron job (bug 435101)
+
* Sun Dec 02 2007 Aurelien Bompard <abompard at fedoraproject.org> 6.7-2
- awstats does not actually require httpd (bug 406901)
- Previous message (by thread): rpms/awstats/F-8 awstats.README.SELinux, 1.1, 1.2 awstats.spec, 1.21, 1.22
- Next message (by thread): rpms/gnome-build/F-7 gnome-build-0.2.4-configure.patch, NONE, 1.1 gnome-build-0.2.4-pkgconfig.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 gnome-build.spec, 1.9, 1.10 sources, 1.4, 1.5 gnome-build-0.2.1-configure.patch, 1.1, NONE gnome-build-0.2.1-pkgconfig.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list