Update to 0.18 release

* No longer distribute our own SELinux policy
This commit is contained in:
Stef Walter 2014-07-30 18:03:29 +02:00
parent 95188aea07
commit 3c06d6f123

View File

@ -1,5 +1,5 @@
Name: cockpit Name: cockpit
Version: 0.17 Version: 0.18
Release: 2%{?dist} Release: 2%{?dist}
Summary: A user interface for Linux servers Summary: A user interface for Linux servers
@ -37,11 +37,7 @@ BuildRequires: libgsystem-devel
BuildRequires: libxslt-devel BuildRequires: libxslt-devel
BuildRequires: docbook-style-xsl BuildRequires: docbook-style-xsl
BuildRequires: dbus-devel BuildRequires: dbus-devel
BuildRequires: glib-networking
# For selinux
BuildRequires: selinux-policy-devel
BuildRequires: checkpolicy
BuildRequires: /usr/share/selinux/devel/policyhelp
Requires: dbus Requires: dbus
Requires: glib-networking Requires: glib-networking
@ -52,7 +48,6 @@ Requires: lvm2
Requires: storaged Requires: storaged
Requires: cockpit-assets Requires: cockpit-assets
Requires: cockpit-selinux-policy
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
@ -73,24 +68,13 @@ BuildArch: noarch
%description assets %description assets
This package contains the web assets used by Cockpit. This package contains the web assets used by Cockpit.
%package selinux-policy
Summary: SELinux policy for Cockpit testing
Requires: %{name} = %{version}-%{release}
Requires: selinux-policy
Requires: selinux-policy-targeted
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles
%description selinux-policy
SELinux policy for Cockpit testing.
%prep %prep
%setup -q %setup -q
rm -rf src/libgsystem/*.{c,doap} rm -rf src/libgsystem/*.{c,doap}
%build %build
%configure --disable-static --disable-silent-rules --with-cockpit-user=cockpit-ws %configure --disable-static --disable-silent-rules --with-cockpit-user=cockpit-ws
make %{?_smp_mflags} all selinux make %{?_smp_mflags} all
%check %check
# The check doesnt run on koji as it requires network # The check doesnt run on koji as it requires network
@ -100,8 +84,6 @@ make %{?_smp_mflags} all selinux
%make_install %make_install
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
install -d %{buildroot}%{_datadir}/selinux/targeted
install -p -m 644 cockpit.pp %{buildroot}%{_datadir}/selinux/targeted/
rm -f %{buildroot}/%{_libdir}/cockpit/*.so rm -f %{buildroot}/%{_libdir}/cockpit/*.so
rm -f %{buildroot}%{_sysconfdir}/dbus-1/system.d/com.redhat.Cockpit.DBusTests.Test.conf rm -f %{buildroot}%{_sysconfdir}/dbus-1/system.d/com.redhat.Cockpit.DBusTests.Test.conf
rm -f %{buildroot}%{_unitdir}/cockpit-testing.service rm -f %{buildroot}%{_unitdir}/cockpit-testing.service
@ -135,10 +117,6 @@ rm -rf %{buildroot}%{_datadir}/cockpit-test-assets
%files assets %files assets
%{_datadir}/%{name} %{_datadir}/%{name}
%files selinux-policy
%defattr(-,root,root,0755)
%{_datadir}/selinux/targeted/cockpit.pp
%pre %pre
getent group cockpit-ws >/dev/null || groupadd -r cockpit-ws getent group cockpit-ws >/dev/null || groupadd -r cockpit-ws
getent group cockpit-user-admin >/dev/null || groupadd -r cockpit-user-admin getent group cockpit-user-admin >/dev/null || groupadd -r cockpit-user-admin
@ -157,20 +135,12 @@ test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
%postun %postun
%systemd_postun_with_restart cockpit.socket %systemd_postun_with_restart cockpit.socket
%post selinux-policy
/usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/cockpit.pp &> /dev/null || :
/sbin/fixfiles -R cockpit restore || :
/sbin/restorecon -R %{_sharedstatedir}/%{name} || :
%postun selinux-policy
if [ $1 -eq 0 ] ; then
/usr/sbin/semodule -s targeted -r cockpit &> /dev/null || :
/sbin/fixfiles -R cockpit-selinux-policy restore || :
[ -d %{_sharedstatedir}/%{name} ] && \
/sbin/restorecon -R %{_sharedstatedir}/%{name} &> /dev/null || :
fi
%changelog %changelog
* Wed Jul 30 2014 Stef Walter <stefw@redhat.com> 0.18-1
- Update to 0.18 release
- Add glib-networking build requirement
- Let selinux-policy-targetted distribute selinux policy
* Mon Jul 28 2014 Colin Walters <walters@verbum.org> 0.17-2 * Mon Jul 28 2014 Colin Walters <walters@verbum.org> 0.17-2
- Drop Requires and references to dead test-assets subpackage - Drop Requires and references to dead test-assets subpackage