[fts/el6] Update for new upstream release
MIchal Simon
simonm at fedoraproject.org
Tue May 13 09:10:40 UTC 2014
commit 490251de59f357f4e44fc0e7ad3d20bf71da1ff5
Author: simonm <michal.simon at cern.ch>
Date: Tue May 13 11:10:19 2014 +0200
Update for new upstream release
fts.spec | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 193 insertions(+), 43 deletions(-)
---
diff --git a/fts.spec b/fts.spec
index cb3a6dd..136dc17 100644
--- a/fts.spec
+++ b/fts.spec
@@ -1,9 +1,10 @@
%global _hardened_build 1
-
%global __provides_exclude_from ^%{python_sitearch}/fts/.*\\.so$
+%global selinux_policyver %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0)
+%global selinux_variants mls targeted
Name: fts
-Version: 3.1.74
+Version: 3.2.25
Release: 1%{?dist}
Summary: File Transfer Service V3
Group: System Environment/Daemons
@@ -11,20 +12,26 @@ License: ASL 2.0
URL: https://svnweb.cern.ch/trac/fts3/wiki
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# svn export https://svn.cern.ch/reps/fts3/tags/EPEL_release_1_EPEL_TESTING fts3
-# tar -czvf fts-0.0.1-60.tar.gz fts-00160
+# svn export https://svn.cern.ch/reps/fts3/trunk fts3
+# tar -czvf fts-3.2.24-2.tar.gz fts3
Source0: https://grid-deployment.web.cern.ch/grid-deployment/dms/fts3/tar/%{name}-%{version}.tar.gz
+Source1: fts.te
+Source2: fts.fc
%if 0%{?el5}
BuildRequires: activemq-cpp-library
%else
BuildRequires: activemq-cpp-devel
%endif
-BuildRequires: apr-devel
-BuildRequires: apr-util-devel
BuildRequires: boost-devel
BuildRequires: CGSI-gSOAP-devel
+
+%if %{?fedora}%{!?fedora:0} >= 18 || %{?rhel}%{!?rhel:0} >= 7
BuildRequires: cmake
+%else
+BuildRequires: cmake28
+%endif
+
BuildRequires: doxygen
%if 0%{?el5}
BuildRequires: e2fsprogs-devel
@@ -42,6 +49,8 @@ BuildRequires: openldap-devel
BuildRequires: pugixml-devel
BuildRequires: python2-devel
BuildRequires: voms-devel
+BuildRequires: checkpolicy, selinux-policy-devel, selinux-policy-doc
+
Requires(pre): shadow-utils
%description
@@ -62,14 +71,12 @@ This package contains development files
%package server
Summary: File Transfer Service version 3 server
Group: System Environment/Daemons
-Requires: bdii
+
Requires: fts-libs%{?_isa} = %{version}-%{release}
Requires: gfal2-plugin-gridftp%{?_isa} >= 2.1.0
-#Requires: gfal2-plugin-http%{?_isa} >= 2.1.0
+Requires: gfal2-plugin-http%{?_isa} >= 2.1.0
Requires: gfal2-plugin-srm%{?_isa} >= 2.1.0
Requires: gfal2-plugin-xrootd%{?_isa} >= 0.2.2
-Requires: glue-schema
-Requires: glue-validator
Requires: gridsite >= 1.7.25
Requires(post): chkconfig
Requires(preun): chkconfig
@@ -99,6 +106,29 @@ server. This includes among others: configuration
parsing, logging and error-handling utilities, as
well as, common definitions and interfaces
+%package infosys
+Summary: File Transfer Service version 3 infosys integration
+Group: System Environment/Daemons
+Requires: bdii
+Requires: fts-server%{?_isa} = %{version}-%{release}
+Requires: glue-schema
+Requires: glue-validator
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(postun): initscripts
+Requires(preun): initscripts
+
+%description infosys
+FTS infosys integration
+
+%package msg
+Summary: File Transfer Service version 3 messaging integration
+Group: System Environment/Daemons
+Requires: fts-server%{?_isa} = %{version}-%{release}
+
+%description msg
+FTS messaging integration
+
%package python
Summary: File Transfer Service version 3 python bindings
Group: System Environment/Libraries
@@ -119,10 +149,25 @@ and canceling transfer-jobs to the FTS service. Additionally,
there is a CLI that can be used for configuration and
administering purposes.
+%package server-selinux
+Summary: SELinux support for fts-server
+Group: Applications/Internet
+Requires: fts-server%{?_isa} = %{version}-%{release}
+%if "%{_selinux_policy_version}" != ""
+Requires: selinux-policy >= %{_selinux_policy_version}
+%else
+Requires: selinux-policy >= %{selinux_policyver}
+%endif
+Requires(post): /usr/sbin/semodule, /sbin/restorecon, fts-server
+Requires(postun): /usr/sbin/semodule, /sbin/restorecon, fts-server
+
+%description server-selinux
+This package setup the SELinux policies for the FTS3 server.
%prep
%setup -qc
-
+mkdir SELinux
+cp -p %{SOURCE1} %{SOURCE2} SELinux
%build
# Make sure the version in the spec file and the version used
@@ -137,9 +182,24 @@ fi
# Build
mkdir build
cd build
-%cmake -DMAINBUILD=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_INSTALL_PREFIX='' ..
+%if %{?fedora}%{!?fedora:0} >= 18 || %{?rhel}%{!?rhel:0} >= 7
+ %cmake -DMAINBUILD=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_INSTALL_PREFIX='' ..
+%else
+ %cmake28 -DMAINBUILD=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_INSTALL_PREFIX='' ..
+%endif
+
make %{?_smp_mflags}
+cd -
+
+# SELinux
+cd SELinux
+for selinuxvariant in %{selinux_variants}; do
+ make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
+ mv fts.pp fts.pp.${selinuxvariant}
+ make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
+done
+cd -
%install
cd build
@@ -153,7 +213,15 @@ mkdir -p %{buildroot}%{_sysconfdir}/fts3
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{python_sitearch}/fts
+cd -
+# SELinux
+for selinuxvariant in %{selinux_variants}; do
+ install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
+ install -p -m 644 SELinux/fts.pp.${selinuxvariant} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/fts.pp
+done
+
+# Server scriptlets
%pre server
getent group fts3 >/dev/null || groupadd -r fts3
getent passwd fts3 >/dev/null || \
@@ -164,12 +232,7 @@ exit 0
%post server
/sbin/chkconfig --add fts-server
/sbin/chkconfig --add fts-bringonline
-/sbin/chkconfig --add fts-msg-bulk
-/sbin/chkconfig --add fts-msg-cron
/sbin/chkconfig --add fts-records-cleaner
-/sbin/chkconfig --add fts-info-publisher
-/sbin/chkconfig --add fts-myosg-updater
-/sbin/chkconfig --add fts-bdii-cache-updater
exit 0
%preun server
@@ -178,12 +241,28 @@ if [ $1 -eq 0 ] ; then
/sbin/chkconfig --del fts-server
/sbin/service fts-bringonline stop >/dev/null 2>&1
/sbin/chkconfig --del fts-bringonline
- /sbin/service fts-msg-bulk stop >/dev/null 2>&1
- /sbin/chkconfig --del fts-msg-bulk
- /sbin/service fts-msg-cron stop >/dev/null 2>&1
- /sbin/chkconfig --del fts-msg-cron
/sbin/service fts-records-cleaner stop >/dev/null 2>&1
/sbin/chkconfig --del fts-records-cleaner
+fi
+exit 0
+
+%postun server
+if [ "$1" -ge "1" ] ; then
+ /sbin/service fts-server condrestart >/dev/null 2>&1 || :
+ /sbin/service fts-bringonline condrestart >/dev/null 2>&1 || :
+ /sbin/service fts-records-cleaner condrestart >/dev/null 2>&1 || :
+fi
+exit 0
+
+# Infosys scriptlets
+%post infosys
+/sbin/chkconfig --add fts-info-publisher
+/sbin/chkconfig --add fts-myosg-updater
+/sbin/chkconfig --add fts-bdii-cache-updater
+exit 0
+
+%preun infosys
+if [ $1 -eq 0 ] ; then
/sbin/service fts-info-publisher stop >/dev/null 2>&1
/sbin/chkconfig --del fts-info-publisher
/sbin/service fts-myosg-updater stop >/dev/null 2>&1
@@ -193,24 +272,64 @@ if [ $1 -eq 0 ] ; then
fi
exit 0
-%postun server
+%postun infosys
if [ "$1" -ge "1" ] ; then
- /sbin/service fts-server condrestart >/dev/null 2>&1 || :
- /sbin/service fts-bringonline condrestart >/dev/null 2>&1 || :
- /sbin/service fts-msg-bulk condrestart >/dev/null 2>&1 || :
- /sbin/service fts-msg-cron condrestart >/dev/null 2>&1 || :
- /sbin/service fts-records-cleaner condrestart >/dev/null 2>&1 || :
/sbin/service fts-info-publisher condrestart >/dev/null 2>&1 || :
/sbin/service fts-myosg-updater condrestart >/dev/null 2>&1 || :
/sbin/service fts-bdii-cache-updater condrestart >/dev/null 2>&1 || :
fi
exit 0
+# Messaging scriptlets
+%post msg
+/sbin/chkconfig --add fts-msg-bulk
+/sbin/chkconfig --add fts-msg-cron
+exit 0
-%post libs -p /sbin/ldconfig
+%preun msg
+if [ $1 -eq 0 ] ; then
+ /sbin/service fts-msg-bulk stop >/dev/null 2>&1
+ /sbin/chkconfig --del fts-msg-bulk
+ /sbin/service fts-msg-cron stop >/dev/null 2>&1
+ /sbin/chkconfig --del fts-msg-cron
+fi
+exit 0
+
+%postun msg
+if [ $1 -eq 0 ] ; then
+ /sbin/service fts-msg-bulk condrestart >/dev/null 2>&1 || :
+ /sbin/service fts-msg-cron condrestart >/dev/null 2>&1 || :
+fi
+exit 0
-%postun libs -p /sbin/ldconfig
+# Libs scriptlets
+%post libs
+/sbin/ldconfig || exit 1
+%postun libs
+/sbin/ldconfig || exit 1
+
+#SELinux scriptlets
+%post server-selinux
+
+# Reset the context set by fts-monitoring-selinux
+if [ $1 -eq 1 ]; then
+ semanage fcontext -d -t httpd_sys_content_t "/var/log/fts3(/.*)?" &> /dev/null
+fi
+
+for selinuxvariant in %{selinux_variants}; do
+ /usr/sbin/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/fts.pp &> /dev/null || :
+done
+/sbin/restorecon -R %{_var}/log/fts3 || :
+
+%postun server-selinux
+if [ $1 -eq 0 ] ; then
+ for selinuxvariant in %{selinux_variants}
+ do
+ /usr/sbin/semodule -s ${selinuxvariant} -r fts &> /dev/null || :
+ done
+ [ -d %{_var}/log/fts3 ] && /sbin/restorecon -R %{_var}/log/fts3 &> /dev/null || :
+fi
%files server
%dir %attr(0755,fts3,root) %{_var}/lib/fts3
@@ -220,26 +339,47 @@ exit 0
%dir %attr(0755,fts3,root) %{_var}/lib/fts3/logs
%dir %attr(0755,fts3,root) %{_var}/log/fts3
%dir %attr(0755,fts3,root) %{_sysconfdir}/fts3
-%config(noreplace) %attr(0644,fts3,root) %{_var}/lib/fts3/bdii_cache.xml
-%config(noreplace) %attr(0644,fts3,root) %{_var}/lib/fts3/myosg.xml
-%{_sbindir}/fts*
-%attr(0755,root,root) %{_initddir}/fts-msg-bulk
+
+%{_sbindir}/fts_bringonline
+%{_sbindir}/fts_db_cleaner
+%{_sbindir}/fts_server
+%{_sbindir}/fts_url_copy
%attr(0755,root,root) %{_initddir}/fts-server
%attr(0755,root,root) %{_initddir}/fts-bringonline
-%attr(0755,root,root) %{_initddir}/fts-msg-cron
%attr(0755,root,root) %{_initddir}/fts-records-cleaner
+%attr(0755,root,root) %{_sysconfdir}/cron.daily/fts-records-cleaner
+%config(noreplace) %attr(0640,root,fts3) %{_sysconfdir}/fts3/fts3config
+%config(noreplace) %{_sysconfdir}/logrotate.d/fts-server
+%{_mandir}/man8/fts_bringonline.8.gz
+%{_mandir}/man8/fts_db_cleaner.8.gz
+%{_mandir}/man8/fts_server.8.gz
+%{_mandir}/man8/fts_url_copy.8.gz
+
+%files infosys
+%{_sbindir}/fts_bdii_cache_updater
+%{_sbindir}/fts_info_publisher
+%{_sbindir}/fts_myosg_updater
+%config(noreplace) %attr(0644,fts3,root) %{_var}/lib/fts3/bdii_cache.xml
+%config(noreplace) %attr(0644,fts3,root) %{_var}/lib/fts3/myosg.xml
%attr(0755,root,root) %{_initddir}/fts-info-publisher
%attr(0755,root,root) %{_initddir}/fts-myosg-updater
%attr(0755,root,root) %{_initddir}/fts-bdii-cache-updater
-%attr(0755,root,root) %{_sysconfdir}/cron.daily/fts-records-cleaner
-%attr(0755,root,root) %{_sysconfdir}/cron.hourly/fts-msg-cron
%attr(0755,root,root) %{_sysconfdir}/cron.hourly/fts-info-publisher
%attr(0755,root,root) %{_sysconfdir}/cron.daily/fts-myosg-updater
%attr(0755,root,root) %{_sysconfdir}/cron.daily/fts-bdii-cache-updater
+%{_mandir}/man8/fts_bdii_cache_updater.8.gz
+%{_mandir}/man8/fts_info_publisher.8.gz
+%{_mandir}/man8/fts_myosg_updater.8.gz
+
+%files msg
+%{_sbindir}/fts_msg_bulk
+%{_sbindir}/fts_msg_cron
+%attr(0755,root,root) %{_initddir}/fts-msg-bulk
+%attr(0755,root,root) %{_initddir}/fts-msg-cron
+%attr(0755,root,root) %{_sysconfdir}/cron.hourly/fts-msg-cron
%config(noreplace) %attr(0640,root,fts3) %{_sysconfdir}/fts3/fts-msg-monitoring.conf
-%config(noreplace) %attr(0640,root,fts3) %{_sysconfdir}/fts3/fts3config
-%config(noreplace) %{_sysconfdir}/logrotate.d/fts-server
-%{_mandir}/man8/fts*
+%{_mandir}/man8/fts_msg_bulk.8.gz
+%{_mandir}/man8/fts_msg_cron.8.gz
%files client
%{_bindir}/fts-config-set
@@ -252,6 +392,9 @@ exit 0
%{_bindir}/fts-transfer-status
%{_bindir}/fts-transfer-submit
%{_bindir}/fts-transfer-cancel
+%{_bindir}/fts-transfer-snapshot
+%{_bindir}/fts-delegation-init
+
%{_mandir}/man1/fts*
%files libs
@@ -295,19 +438,26 @@ exit 0
%{_libdir}/libfts_delegation_api_cpp.so
%{_mandir}/man1/fts*
+%files server-selinux
+%defattr(-,root,root,0755)
+%doc SELinux/*
+%{_datadir}/selinux/*/fts.pp
%changelog
-* Wed Feb 19 2014 Michal Simon <michal.simon at cern.ch> - 3.1.74-1
+* Mon May 12 2014 Michal Simon <michal.simon at cern.ch> - 3.2.25-1
- Update for new upstream release
-* Tue Feb 11 2014 Michal Simon <michal.simon at cern.ch> - 3.1.33-3
- - rebuild for libactivemq-cpp
+* Tue Feb 04 2014 Alejandro Alvarez <aalvarez at cern.ch> - 3.2.24-4
+ - introduced dist back in the release
+* Tue Jan 14 2014 Alejandro Alvarez <aalvarez at cern.ch> - 3.2.24-3
+ - using cmake28
+* Mon Jan 13 2014 Alejandro Alvarez <aalvarez at cern.ch> - 3.2.24-2
+ - separated rpms for messaging and infosys subsystems
* Mon Nov 18 2013 Alejandro Alvarez Ayllon <aalvarez at cern.ch> - 3.1.33-2
- Added missing changelog entry
- Fixed bogus date
* Tue Oct 29 2013 Michal Simon <michal.simon at cern.ch> - 3.1.33-1
- Update for new upstream release
* Wed Aug 07 2013 Michal Simon <michal.simon at cern.ch> - 3.1.1-2
- - GenericDbIfce.h includes new blacklisting API
- no longer linking explicitly to boost libraries with '-mt' sufix
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list