use tmpfiles service for creating lockfiles

resovles issues with selinux labling when lockfiles are created by
iscsiadm

Signed-off-by: Chris Leech <cleech@redhat.com>
This commit is contained in:
Chris Leech 2013-06-11 10:25:12 -07:00
parent 631ea075f0
commit 3c58b16ee1
2 changed files with 10 additions and 1 deletions

View File

@ -7,10 +7,11 @@
Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils
Version: 6.%{open_iscsi_version}.%{open_iscsi_build}
Release: 6%{?dist}
Release: 7%{?dist}
Source0: http://www.open-iscsi.org/bits/open-iscsi-%{open_iscsi_version}-%{open_iscsi_build}.tar.gz
Source1: iscsiuio-%{iscsiuio_version}.tar.gz
Source4: 04-iscsi
Source5: iscsi-tmpfiles.conf
# upstream patches, post last tagged version
Patch1: 0001-iscsid-fix-iscsid-segfault-during-qla4xxx-login.patch
@ -177,6 +178,7 @@ install -p -D -m 644 etc/systemd/iscsiuio.service $RPM_BUILD_ROOT%{_unitdir}/isc
install -p -D -m 644 etc/systemd/iscsiuio.socket $RPM_BUILD_ROOT%{_unitdir}/iscsiuio.socket
install -p -D -m 755 etc/systemd/iscsi_mark_root_nodes $RPM_BUILD_ROOT/usr/libexec/iscsi_mark_root_nodes
install -p -m 755 %{SOURCE4} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
install -p -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/iscsi.conf
install -p -m 755 libiscsi/libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}
ln -s libiscsi.so.0 $RPM_BUILD_ROOT%{_libdir}/libiscsi.so
@ -251,6 +253,7 @@ fi
%{_unitdir}/iscsiuio.socket
/usr/libexec/iscsi_mark_root_nodes
%{_sysconfdir}/NetworkManager/dispatcher.d/04-iscsi
/usr/lib/tmpfiles.d/iscsi.conf
%dir %{_sysconfdir}/iscsi
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
/sbin/*
@ -266,6 +269,10 @@ fi
%{_includedir}/libiscsi.h
%changelog
* Tue Jun 11 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-7
- Use the systemd tmpfiles service to recreate lockfiles in /var/lock
Otherwise selinux labeling is wrong when created by a manual iscsiadm command
* Tue May 28 2013 Chris Leech <cleech@redhat.com> - 6.2.0.873-6
- Don't have iscsiadm scan for autostart record if node db is empty (bug #951951)

2
iscsi-tmpfiles.conf Normal file
View File

@ -0,0 +1,2 @@
d /run/lock/iscsi 0700 root root -
f /run/lock/iscsi/lock 0600 root root -