spec file cleanups

This commit is contained in:
Chris Leech 2013-08-13 09:11:08 -07:00
parent 1efedd2bdd
commit f88dce52a8

View File

@ -1,5 +1,3 @@
%global _hardened_build 1
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define open_iscsi_version 2.0
%define open_iscsi_build 873
@ -61,6 +59,7 @@ License: GPLv2+
URL: http://www.open-iscsi.org
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl-devel flex bison python-devel doxygen glibc-static kmod-devel
BuildRequires: systemd
# For dir ownership
Requires(post): systemd
Requires(preun): systemd
@ -72,6 +71,11 @@ as well as the utility programs used to manage it. iSCSI is a protocol
for distributed disk access using SCSI commands sent over Internet
Protocol networks.
%global _hardened_build 1
%global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\\.so$
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
@ -133,7 +137,7 @@ make OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod"
cd iscsiuio
chmod u+x configure
./configure --enable-debug
%{configure} --enable-debug
make OPTFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
cd ..
@ -148,9 +152,9 @@ popd
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT/etc/iscsi
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/iscsi
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/NetworkManager/dispatcher.d
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/nodes
mkdir -p $RPM_BUILD_ROOT/var/lib/iscsi/send_targets
@ -181,8 +185,8 @@ install -p -D -m 644 etc/systemd/iscsid.socket $RPM_BUILD_ROOT%{_unitdir}/iscsid
install -p -D -m 644 etc/systemd/iscsiuio.service $RPM_BUILD_ROOT%{_unitdir}/iscsiuio.service
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 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/NetworkManager/dispatcher.d
install -p -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/%{_tmpfilesdir}/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
@ -257,14 +261,14 @@ fi
%{_unitdir}/iscsiuio.socket
/usr/libexec/iscsi_mark_root_nodes
%{_sysconfdir}/NetworkManager/dispatcher.d/04-iscsi
/usr/lib/tmpfiles.d/iscsi.conf
%{_tmpfilesdir}/iscsi.conf
%dir %{_sysconfdir}/iscsi
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
/sbin/*
%{_libdir}/libiscsi.so.0
%{python_sitearch}/libiscsimodule.so
%{_mandir}/man8/*
%{_sysconfdir}/logrotate.d/iscsiuiolog
%config(noreplace) %{_sysconfdir}/logrotate.d/iscsiuiolog
%files devel
%defattr(-,root,root,-)
@ -302,11 +306,11 @@ fi
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.2.0.872-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Feb 14 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.18
* Tue Feb 14 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.18
- 789683 Fix boot slow down when the iscsi service is started
(regression added in 6.2.0.872.16 when the nm wait was added).
* Mon Feb 5 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.17
* Mon Feb 6 2012 Mike Christie <mchristi@redhat.com> 6.2.0.872.17
- 786174 Change iscsid/iscsi service startup, so it always starts
when called.
@ -344,7 +348,7 @@ fi
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 6.2.0.872-8
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Fri Jul 12 2010 Mike Christie <mchristi@redhat.com> 6.2.0.872.7
* Mon Jul 12 2010 Mike Christie <mchristi@redhat.com> 6.2.0.872.7
- Sync to upstream open-iscsi-2.0-872-rc4 which fixes:
iscsiadm discovery port handling, add discoveryd init script
support, move from iscsid.conf to discovery db discoveryd settings,
@ -463,7 +467,7 @@ fi
- 437522 iscsi startup does not need to modify with network startup.
- 436175 Check for running sessions when stopping service.
* Wed Feb 5 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.868-0.3
* Wed Feb 6 2008 Mike Christie <mchristie@redhat.com> - 6.2.0.868-0.3
- Rebase to upstream and RHEL5.
- 246960 LSB init script changes.
@ -472,7 +476,7 @@ fi
- Revert init script startup changes from 225915 which reviewers did
not like.
* Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
* Wed Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
- 225915 From Adrian Reber - Fix up spec and init files for rpmlint.
* Tue Feb 6 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.0
@ -493,7 +497,7 @@ fi
- Add commands missing from RHEL4/RHEL3 and document iscsid.conf.
- Fixup README.
* Mon Nov 7 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.8
* Tue Nov 7 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.8
- Rebase to upstream open-iscsi-2.0-730.
* Tue Oct 17 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.7
@ -507,7 +511,7 @@ iscsi devices (include iscsi root and dm/md over iscsi) get syncd.
* Tue Oct 3 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.5
- BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi
* Mon Oct 1 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.4
* Mon Oct 2 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.4
- BZ 208548 move /etc/iscsi/lock to /var/lock/iscsi/lock
* Wed Sep 27 2006 Jeremy Katz <katzj@redhat.com> - 6.2.0.695-0.3