Skip to content

Commit

Permalink
Revert "adding first cut of our SELinux policy"
Browse files Browse the repository at this point in the history
This reverts commit d62debd.

Will create separate package for that.
  • Loading branch information
lzap committed Jan 23, 2012
1 parent 77b8574 commit a3ca860
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 356 deletions.
6 changes: 0 additions & 6 deletions selinux/katello.fc

This file was deleted.

195 changes: 0 additions & 195 deletions selinux/katello.if

This file was deleted.

50 changes: 0 additions & 50 deletions selinux/katello.sh

This file was deleted.

51 changes: 0 additions & 51 deletions selinux/katello.te

This file was deleted.

54 changes: 0 additions & 54 deletions src/katello.spec
Expand Up @@ -14,9 +14,6 @@
%global homedir %{_datarootdir}/%{name}
%global datadir %{_sharedstatedir}/%{name}
%global confdir deploy/common
%global selinux_variants mls strict targeted
%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0)
%global modulename katello

Name: katello
Version: 0.1.190
Expand Down Expand Up @@ -146,26 +143,6 @@ Requires: %{name}-common
%description glue-candlepin
Katello connection classes for the Candlepin backend

%package selinux
Summary: SELinux policy module supporting katello
Group: System Environment/Base
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: /usr/share/selinux/devel/policyhelp
BuildRequires: hardlink

%if "%{selinux_policyver}" != ""
Requires: selinux-policy >= %{selinux_policyver}
%endif
Requires: %{name} = %{version}-%{release}
Requires(post): /usr/sbin/semodule
Requires(post): /sbin/restorecon
Requires(postun): /usr/sbin/semodule
Requires(postun): /sbin/restorecon

%description selinux
SELinux policy module supporting katello

%prep
%setup -q

Expand All @@ -192,15 +169,6 @@ jammit --config config/assets.yml -f
echo Generating gettext files...
ruby -e 'require "rubygems"; require "gettext/tools"; GetText.create_mofiles(:po_root => "locale", :mo_root => "locale")'

cd selinux
for selinuxvariant in %{selinux_variants}
do
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
done
cd -

%install
rm -rf %{buildroot}
#prepare dir structure
Expand Down Expand Up @@ -297,23 +265,6 @@ if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi

%post selinux
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -i \
%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
done
/sbin/restorecon %{_localstatedir}/cache/thumbslug || :

%postun selinux
if [ $1 -eq 0 ] ; then
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
done
fi


%files
%attr(600, katello, katello)
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.yml
Expand Down Expand Up @@ -380,11 +331,6 @@ fi

%files all

%file selinux
%defattr(-,root,root,0755)
%doc selinux/*
%{_datadir}/selinux/*/%{modulename}.pp

%pre common
# Add the "katello" user and group
getent group %{name} >/dev/null || groupadd -r %{name}
Expand Down

0 comments on commit a3ca860

Please sign in to comment.