update to 3.1
This commit is contained in:
parent
d1cd3370c3
commit
0a25f63782
Binary file not shown.
BIN
mcstrans-3.1.tar.gz
Normal file
BIN
mcstrans-3.1.tar.gz
Normal file
Binary file not shown.
@ -1,20 +1,19 @@
|
||||
Name: mcstrans
|
||||
Version: 0.3.4
|
||||
Release: 17
|
||||
Version: 3.1
|
||||
Release: 1
|
||||
Summary: SELinux Translation Daemon
|
||||
License: GPL2
|
||||
URL: https://src.fedoraproject.org/rpms/mcstrans
|
||||
Source0: https://src.fedoraproject.org/repo/pkgs/mcstrans/%{name}-%{version}.tgz
|
||||
Source1: mcstransd.service
|
||||
URL: https://github.com/SELinuxProject/selinux/wiki
|
||||
Source: https://github.com/SELinuxProject/selinux/releases/download/20200710/mcstrans-3.1.tar.gz
|
||||
|
||||
BuildRequires: gcc systemd-units make
|
||||
BuildRequires: libselinux-devel >= 1.30.3-1
|
||||
BuildRequires: libselinux-devel >= %{version}
|
||||
BuildRequires: libcap-devel pcre-devel libsepol-devel libsepol-static
|
||||
Requires: pcre
|
||||
Requires(pre): systemd
|
||||
Requires(post): systemd
|
||||
Provides: libsetrans
|
||||
Obsoletes: libsetrans
|
||||
Provides: libsetrans = %{version}-%{release}
|
||||
Obsoletes: libsetrans < %{version}-%{release}
|
||||
Provides: setransd
|
||||
|
||||
%description
|
||||
@ -41,44 +40,38 @@ mcstrans-help include help files for man page
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
make clean
|
||||
make CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" LIBDIR="%{_libdir}" %{?_smp_mflags}
|
||||
%set_build_flags
|
||||
|
||||
make LIBDIR="%{_libdir}" %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/selinux/mls/setrans.d
|
||||
mkdir -p %{buildroot}%{_usr}/share/mcstrans
|
||||
mkdir -p %{buildroot}/%{_libdir}
|
||||
mkdir -p %{buildroot}/%{_lib}
|
||||
mkdir -p %{buildroot}/%{_libdir}
|
||||
mkdir -p %{buildroot}%{_usr}/share/mcstrans
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/selinux/mls/setrans.d
|
||||
|
||||
make SHLIBDIR="%{buildroot}/%{_lib}" SBINDIR="%{buildroot}%{_sbindir}" DESTDIR="%{buildroot}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
make DESTDIR="%{buildroot}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" SBINDIR="%{_sbindir}" install
|
||||
rm -f %{buildroot}%{_libdir}/*.a
|
||||
cp -r share/* %{buildroot}%{_usr}/share/mcstrans/
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||
ln -s %{_unitdir}/mcstrans.service %{buildroot}/%{_unitdir}/mcstransd.service
|
||||
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/mcstrans
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_post mcstransd.service
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/usr/bin/systemctl --no-reload mcstransd.service >/dev/null 2>&1 || :
|
||||
/usr/bin/systemctl stop mcstransd.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_preun mcstransd.service
|
||||
|
||||
%postun
|
||||
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ]; then
|
||||
/usr/bin/systemctl try-restart mcstransd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_postun mcstransd.service
|
||||
|
||||
%files
|
||||
%dir %{_sysconfdir}/selinux/mls/setrans.d
|
||||
%{_unitdir}/mcstransd.service
|
||||
/usr/sbin/mcstransd
|
||||
%{_unitdir}/mcstrans.service
|
||||
%{_unitdir}/mcstransd.service
|
||||
%dir %{_sysconfdir}/selinux/mls/setrans.d
|
||||
%dir %{_usr}/share/mcstrans
|
||||
%defattr(0644,root,root,0755)
|
||||
%dir %{_usr}/share/mcstrans/util
|
||||
@ -88,9 +81,15 @@ fi
|
||||
%{_usr}/share/mcstrans/util/*
|
||||
|
||||
%files help
|
||||
%{_mandir}/man5/*.5.gz
|
||||
%{_mandir}/man8/*.8.gz
|
||||
%{_mandir}/ru/man5/*.5.gz
|
||||
%{_mandir}/ru/man8/*.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jul 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.1-1
|
||||
- update to 3.1
|
||||
|
||||
* Thu Feb 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.3.4-17
|
||||
- add BuildRequires: make
|
||||
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description= Daemon used to translate SELinux MCS/MLS labels to human readable form
|
||||
After=syslog.target
|
||||
ConditionPathExists=/etc/selinux/mls/setrans.d
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/mcstransd.pid
|
||||
ExecStart=/usr/sbin/mcstransd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
x
Reference in New Issue
Block a user