diff options
author | binary-manu <47382117+binary-manu@users.noreply.github.com> | 2021-05-26 18:03:22 +0200 |
---|---|---|
committer | binary-manu <47382117+binary-manu@users.noreply.github.com> | 2021-05-26 18:03:22 +0200 |
commit | 17af3651d4b6aab67c283896863ea216ace62c47 (patch) | |
tree | bebb0ef67d2d92d5501cf087265bdf5b7ab5cf07 | |
parent | 2aac589db9661da944b6d35cdd25a098ef3a840f (diff) | |
parent | 2a042c913ccc2ebf114386d33eb1aa4484d7aca4 (diff) | |
download | tigervnc-17af3651d4b6aab67c283896863ea216ace62c47.tar.gz tigervnc-17af3651d4b6aab67c283896863ea216ace62c47.zip |
Merge branch 'TigerVNC:master' into accented-chars
-rw-r--r-- | contrib/packages/rpm/el7/SPECS/tigervnc.spec | 34 | ||||
-rw-r--r-- | contrib/packages/rpm/el8/SPECS/tigervnc.spec | 36 | ||||
-rw-r--r-- | unix/vncserver/selinux/Makefile | 13 |
3 files changed, 51 insertions, 32 deletions
diff --git a/contrib/packages/rpm/el7/SPECS/tigervnc.spec b/contrib/packages/rpm/el7/SPECS/tigervnc.spec index f739755c..52eea001 100644 --- a/contrib/packages/rpm/el7/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el7/SPECS/tigervnc.spec @@ -1,3 +1,8 @@ + +#defining macros needed by SELinux +%global selinuxtype targeted +%global modulename vncsession + Name: tigervnc Version: @VERSION@ Release: 1%{?snap:.%{snap}}%{?dist} @@ -121,10 +126,11 @@ This package contains icons for TigerVNC viewer %package selinux Summary: SELinux module for TigerVNC BuildArch: noarch -Requires(pre): libselinux-utils -Requires(post): selinux-policy-base >= %{_selinux_policy_version} -Requires(post): policycoreutils policycoreutils-python -Requires(post): libselinux-utils +BuildRequires: selinux-policy-devel +Requires: selinux-policy-%{selinuxtype} +Requires(post): selinux-policy-%{selinuxtype} +BuildRequires: selinux-policy-devel +%{?selinux_requires} %description selinux This package provides the SELinux policy module to ensure TigerVNC @@ -234,20 +240,18 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/hicolor || : fi + %pre selinux -%selinux_relabel_pre +%selinux_relabel_pre -s %{selinuxtype} %post selinux -%selinux_modules_install %{_datadir}/selinux/packages/vncsession.pp -%selinux_relabel_post - -%posttrans selinux -%selinux_relabel_post +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 +%selinux_relabel_post -s %{selinuxtype} %postun selinux -%selinux_modules_uninstall vncsession if [ $1 -eq 0 ]; then - %selinux_relabel_post + %selinux_modules_uninstall -s %{selinuxtype} %{modulename} + %selinux_relabel_post -s %{selinuxtype} fi %files -f %{name}.lang @@ -297,9 +301,13 @@ fi %{_datadir}/icons/hicolor/*/apps/* %files selinux -%{_datadir}/selinux/packages/vncsession.pp +%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* +%ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} %changelog +* Tue May 18 2021 Jan Grulich <jgrulich@redhat.com> 1.11.0-1 +- SELinux package improvements + * Mon Jul 27 2020 Mark Mielke <mmielke@ciena.com> 1.10.1-1 - Update build requirements and fix unexpected rpm macro expansion. diff --git a/contrib/packages/rpm/el8/SPECS/tigervnc.spec b/contrib/packages/rpm/el8/SPECS/tigervnc.spec index c2017cae..2a4e4dbd 100644 --- a/contrib/packages/rpm/el8/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el8/SPECS/tigervnc.spec @@ -1,3 +1,8 @@ + +#defining macros needed by SELinux +%global selinuxtype targeted +%global modulename vncsession + Name: tigervnc Version: @VERSION@ Release: 1%{?snap:.%{snap}}%{?dist} @@ -55,7 +60,7 @@ Provides: tightvnc-server = 1.5.0-0.15.20090204svn3586 Obsoletes: tightvnc-server < 1.5.0-0.15.20090204svn3586 Requires: perl-interpreter Requires: tigervnc-server-minimal = %{version}-%{release} -Requires: tigervnc-selinux = %{version}-%{release} +Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) Requires: xorg-x11-xauth Requires: xorg-x11-xinit Requires(post): systemd @@ -122,10 +127,11 @@ This package contains icons for TigerVNC viewer %package selinux Summary: SELinux module for TigerVNC BuildArch: noarch -Requires(pre): libselinux-utils -Requires(post): selinux-policy-base >= %{_selinux_policy_version} -Requires(post): policycoreutils policycoreutils-python -Requires(post): libselinux-utils +BuildRequires: selinux-policy-devel +Requires: selinux-policy-%{selinuxtype} +Requires(post): selinux-policy-%{selinuxtype} +BuildRequires: selinux-policy-devel +%{?selinux_requires} %description selinux This package provides the SELinux policy module to ensure TigerVNC @@ -235,20 +241,18 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/hicolor || : fi + %pre selinux -%selinux_relabel_pre +%selinux_relabel_pre -s %{selinuxtype} %post selinux -%selinux_modules_install %{_datadir}/selinux/packages/vncsession.pp -%selinux_relabel_post - -%posttrans selinux -%selinux_relabel_post +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 +%selinux_relabel_post -s %{selinuxtype} %postun selinux -%selinux_modules_uninstall vncsession if [ $1 -eq 0 ]; then - %selinux_relabel_post + %selinux_modules_uninstall -s %{selinuxtype} %{modulename} + %selinux_relabel_post -s %{selinuxtype} fi %files -f %{name}.lang @@ -298,9 +302,13 @@ fi %{_datadir}/icons/hicolor/*/apps/* %files selinux -%{_datadir}/selinux/packages/vncsession.pp +%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* +%ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} %changelog +* Tue May 18 2021 Jan Grulich <jgrulich@redhat.com> 1.11.0-1 +- SELinux package improvements + * Mon Jul 27 2020 Mark Mielke <mmielke@ciena.com> 1.10.1-1 - Update build requirements and fix unexpected rpm macro expansion. diff --git a/unix/vncserver/selinux/Makefile b/unix/vncserver/selinux/Makefile index 7497bf84..b23f20f6 100644 --- a/unix/vncserver/selinux/Makefile +++ b/unix/vncserver/selinux/Makefile @@ -10,15 +10,18 @@ PREFIX=/usr DATADIR=$(PREFIX)/share -all: vncsession.pp +all: vncsession.pp.bz2 + +%.pp.bz2: %.pp + bzip2 -9 $^ %.pp: %.te make -f $(DATADIR)/selinux/devel/Makefile $@ clean: - rm -f *.pp + rm -f *.pp *.pp.bz2 rm -rf tmp -install: vncsession.pp - mkdir -p $(DESTDIR)$(DATADIR)/selinux/packages - install vncsession.pp $(DESTDIR)$(DATADIR)/selinux/packages/vncsession.pp +install: vncsession.pp.bz2 + mkdir -p $(DESTDIR)$(DATADIR)/selinux/packages/targeted/ + install vncsession.pp.bz2 $(DESTDIR)$(DATADIR)/selinux/packages/targeted/vncsession.pp.bz2 |