rpms/389-admin/F-12 389-admin.spec,1.16,1.17
Nathan Kinder
nkinder at fedoraproject.org
Wed Apr 7 22:44:40 UTC 2010
Author: nkinder
Update of /cvs/extras/rpms/389-admin/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv32260/F-12
Modified Files:
389-admin.spec
Log Message:
Moved selinux subpackage into base package.
Index: 389-admin.spec
===================================================================
RCS file: /cvs/extras/rpms/389-admin/F-12/389-admin.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- 389-admin.spec 6 Apr 2010 19:12:46 -0000 1.16
+++ 389-admin.spec 7 Apr 2010 22:44:39 -0000 1.17
@@ -16,6 +16,7 @@ Group: System Environment/Dae
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: fedora-ds-admin = %{version}-%{release}
Obsoletes: fedora-ds-admin < 1.1.8-1
+Obsoletes: %{name}-selinux
BuildRequires: nspr-devel
BuildRequires: nss-devel
@@ -38,12 +39,14 @@ BuildRequires: 389-ds-base-selinux-de
Requires: 389-ds-base
Requires: mod_nss
-# require our selinux subpackage
-Requires: %{name}-selinux = %{version}-%{release}
-
# this is needed for using semanage from our setup scripts
Requires: policycoreutils-python
+# this is needed to load and unload the policy module
+Requires(post): policycoreutils
+Requires(preun): policycoreutils
+Requires(postun): policycoreutils
+
# the following are needed for some of our scripts
Requires: perl-Mozilla-LDAP
Requires: nss-tools
@@ -64,22 +67,6 @@ for 389 Directory Server. It provides s
be used through a web browser. It provides the authentication, access control,
and CGI utilities used by the console.
-%package selinux
-Summary: SELinux policy for 389 Administration Server
-Group: System Environment/Daemons
-Requires: selinux-policy
-Requires: 389-ds-base-selinux
-
-# this is needed to load and unload the policy module
-Requires(post): policycoreutils
-Requires(post): /sbin/service
-Requires(preun): policycoreutils
-Requires(preun): /sbin/service
-Requires(postun): policycoreutils
-
-%description selinux
-SELinux policy for the 389 Adminstration Server package.
-
%prep
%setup -q -n %{name}-%{version}%{?prerel}
%patch1
@@ -174,14 +161,32 @@ if %{pkgname}admin_consoleconf then
posix.chmod('%{_sysconfdir}/%{pkgname}/admin-serv/console.conf', %{pkgname}admin_consoleconf.mode)
posix.chown('%{_sysconfdir}/%{pkgname}/admin-serv/console.conf', %{pkgname}admin_consoleconf.uid, %{pkgname}admin_consoleconf.gid)
end
+-- load the selinux policy module
+variants = "%{selinux_variants}"
+for selinuxvariant in string.gfind(variants, "%a+") do
+ os.execute('semodule -s '..selinuxvariant..' -i %{_datadir}/selinux/'..selinuxvariant..'/%{pkgname}-admin.pp > /dev/null 2>&1')
+end
+-- label the files installed by this package
+os.execute('fixfiles -R %{name} restore > /dev/null 2>&1')
%preun
if [ $1 = 0 ]; then
/sbin/service %{pkgname}-admin stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{pkgname}-admin
+ for selinuxvariant in %{selinux_variants}
+ do
+ semodule -s ${selinuxvariant} -r %{pkgname}-admin 2>/dev/null || :
+ done
fi
-%postun -p /sbin/ldconfig
+%postun
+/sbin/ldconfig
+if [ "$1" -ge "1" ]; then # Upgrade
+for selinuxvariant in %{selinux_variants}
+do
+ semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/%{pkgname}-admin.pp 2>/dev/null || :
+done
+fi
%posttrans -p <lua>
-- if we saved the run level configuration in %pre, restore it now
@@ -196,33 +201,6 @@ if %{pkgname}admin_exists then
os.execute('/sbin/service %{pkgname}-admin start >/dev/null 2>&1')
end
-%post selinux
-if [ "$1" -le "1" ] ; then # First install
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/%{pkgname}-admin.pp 2>/dev/null || :
-done
-fixfiles -R %{name} restore || :
-/sbin/service %{pkgname}-admin condrestart > /dev/null 2>&1 || :
-fi
-
-%preun selinux
-if [ "$1" -lt "1" ]; then # Final removal
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -r %{pkgname}-admin 2>/dev/null || :
-done
-fixfiles -R %{name} restore || :
-/sbin/service %{pkgname}-admin condrestart > /dev/null 2>&1 || :
-fi
-
-%postun selinux
-if [ "$1" -ge "1" ]; then # Upgrade
-for selinuxvariant in %{selinux_variants}
-do
- semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/%{pkgname}-admin.pp 2>/dev/null || :
-done
-fi
%files
%defattr(-,root,root,-)
@@ -230,6 +208,7 @@ fi
%dir %{_sysconfdir}/%{pkgname}/admin-serv
%config(noreplace)%{_sysconfdir}/%{pkgname}/admin-serv/*.conf
%{_datadir}/%{pkgname}
+%{_datadir}/selinux/*/%{pkgname}-admin.pp
%{_sysconfdir}/rc.d/init.d/%{pkgname}-admin
%config(noreplace)%{_sysconfdir}/sysconfig/%{pkgname}-admin
%{_sbindir}/*
@@ -237,16 +216,13 @@ fi
%{_libdir}/%{pkgname}
%{_mandir}/man8/*
-%files selinux
-%defattr(-,root,root,-)
-%{_datadir}/selinux/*/%{pkgname}-admin.pp
-
%changelog
-* Tue Apr 6 2010 Nathan Kinder <nkinder at redhat.com> - 1.1.11-0.3.a3
+* Tue Apr 7 2010 Nathan Kinder <nkinder at redhat.com> - 1.1.11-0.3.a3
- 1.1.11.a3 release
- Bug 570912 - dirsrv-admin SELinux module fails to install
- Change parsing of start-slapd for instance name
-- Bug 574233 - Updated requirements for selinux subpackage
+- Bug 574233 - Updated requirements for selinux policy
+- Moved selinux subpackage into base package
* Fri Feb 26 2010 Rich Megginson <rmeggins at redhat.com> - 1.1.11.a2-0.2
- the 1.1.11.a2 release
More information about the scm-commits
mailing list