Skip to content
Snippets Groups Projects
nordugrid-arc.spec.in 35.3 KiB
Newer Older
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
Mattias Ellert's avatar
Mattias Ellert committed
%if %{?filter_setup:1}%{!?filter_setup:0}
%filter_provides_in %{python_sitearch}.*\.so$
%filter_setup
%endif

%global with_lfc  %{!?_without_lfc:1}%{?_without_lfc:0}
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
%global with_java %{!?_without_java:1}%{?_without_java:0}
%else
%global with_java 0
%endif
%global with_gcj  %{!?_with_gcj:0}%{?_with_gcj:1}
Version:	@baseversion@
Release:	@fedorarelease@%{?dist}
Summary:	ARC
Group:		System Environment/Daemons
License:	ASL 2.0
URL:		http://www.nordugrid.org/
Source:		%{name}-%{version}@preversion@.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Provides:	%{name}-libs = %{version}-%{release}
Obsoletes:	%{name}-libs < 1.0.0
Provides:	nordugrid-arc1 = 1.3.0
Obsoletes:	nordugrid-arc1 < 1.0.0
Provides:	nordugrid-arc-nox = 1.3.0
Obsoletes:	nordugrid-arc-nox < 1.3.0
#		Packages dropped without replacements
Obsoletes:	%{name}-httpsd < 0.8.2-1
Obsoletes:	%{name}-logger-server < 0.8.2-1
Obsoletes:	nordugrid-arc-nox-charon < 1.3.0
Obsoletes:	nordugrid-arc-nox-compiler < 1.3.0
Obsoletes:	nordugrid-arc-nox-delegation < 1.3.0
Obsoletes:	nordugrid-arc-nox-paul < 1.3.0
Obsoletes:	nordugrid-arc-nox-saml2sp < 1.3.0
Obsoletes:	nordugrid-arc-nox-slcs < 1.3.0

BuildRequires:	cppunit-devel
BuildRequires:	pkgconfig
%if %{?fedora}%{!?fedora:0} >= 12 || %{?rhel}%{!?rhel:0} >= 6
BuildRequires:	libuuid-devel
BuildRequires:	e2fsprogs-devel
BuildRequires:	gettext
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
BuildRequires:	python-devel
BuildRequires:	glibmm24-devel
BuildRequires:	glib2-devel
BuildRequires:	libxml2-devel
BuildRequires:	openssl-devel
BuildRequires:	xmlsec1-devel >= 1.2.4
BuildRequires:	xmlsec1-openssl-devel >= 1.2.4
BuildRequires:	openldap-devel
BuildRequires:	globus-common-devel
BuildRequires:	globus-ftp-client-devel
BuildRequires:	globus-ftp-control-devel
BuildRequires:	globus-rls-client-devel
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_lfc}
BuildRequires:	lfc-devel
BuildRequires:	gridsite-devel
Anders Waananen's avatar
Anders Waananen committed
%if %{?suse_version}%{!?suse_version:0}
BuildRequires:	libdb-4_5-devel
Anders Waananen's avatar
Anders Waananen committed
%else
BuildRequires:	db4-devel
Anders Waananen's avatar
Anders Waananen committed
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java}
BuildRequires:	java-devel
BuildRequires:	jpackage-utils
%if %{?fedora}%{!?fedora:0} == 3
BuildRequires:	libgcj-devel
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_gcj}
Mattias Ellert's avatar
Mattias Ellert committed
%if %{?fedora}%{!?fedora:0} >= 4 || %{?rhel}%{!?rhel:0} >= 5
BuildRequires:	java-gcj-compat-devel
Anders Waananen's avatar
Anders Waananen committed
%else
BuildRequires:	java-1.4.2-gcj-compat-devel
Anders Waananen's avatar
Anders Waananen committed
%endif
Mattias Ellert's avatar
Mattias Ellert committed
%endif
%endif
# Needed for LRMS testing during make check
BuildRequires:	perl(Test::Harness)
BuildRequires:	perl(Test::Simple)
BuildRequires:	mktemp
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
# The compilation of the selinux module fails on Fedora 5
BuildRequires:	selinux-policy-devel
%endif
BuildRequires:	swig
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Provides:	nordugrid-arc1-client = 1.3.0
Obsoletes:	nordugrid-arc1-client < 1.0.0
Provides:	nordugrid-arc-nox-client = 1.3.0
Obsoletes:	nordugrid-arc-nox-client < 1.3.0
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
For the regular user of any ARC-based computational grid,
this client package contains (or depends on) all packages
that are needed to submit jobs, query their status and
retrieve results.
Summary:	ARC Hosting Environment Daemon
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-server = 1.3.0
Obsoletes:	nordugrid-arc1-server < 1.0.0
Provides:	nordugrid-arc-nox-hed = 1.3.0
Obsoletes:	nordugrid-arc-nox-hed < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
%description hed
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
The ARC Hosting Environment Daemon (HED). This daemon presents a
site to other participants on the grid.  An intrinsic component
of any grid system is a mechanism allowing for the secure stateful
communication with remote environments. HED prepares for such an
environment and as such is the core of the ARC middleware. HED
was however written in a way, that represents typical grid
computing tasks (the sharing of CPU time or storage) to become
just one possible service between a user and a remote machine.
Many others are thinkable, and HED takes considerable effort
away from the respective implementors.
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Summary:	ARC chelonia service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-python = %{version}-%{release}
Provides:	nordugrid-arc-nox-chelonia = 1.3.0
Obsoletes:	nordugrid-arc-nox-chelonia < 1.3.0

%description chelonia
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

The NorduGrid storage service Chelonia consists of a set of SOAP based
services residing within HED. Together, the services provide a self-healing,
reliable, robust, scalable, resilient and consistent data storage system.
%package hopi
Summary:	ARC hopi service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Provides:	nordugrid-arc-nox-hopi = 1.3.0
Obsoletes:	nordugrid-arc-nox-hopi < 1.3.0

%description hopi
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
The HOPI service provides a simple implementation of an http(s)
server. It supports GET and PUT operations. It can be used as a simple
file transfer service and it is usable via common web browsers and
other http(s) clients (e.g. wget).
Summary:	ARC isis service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Provides:	nordugrid-arc-nox-isis = 1.3.0
Obsoletes:	nordugrid-arc-nox-isis < 1.3.0

%description isis
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).
ISIS is the new ARC information system implemented within HED. ISIS
comes with P2P capabilities and a web-services interface. The new system
grants grid participants an increase in flexibility, robustness and it
also offers easier configuration and self-healing capability.
%package gridftpd
Summary:	ARC gridftp server
Group:		System Environment/Daemons
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-plugins-globus
Provides:	nordugrid-arc-nox-gridftp-server = 1.3.0
Obsoletes:	nordugrid-arc-nox-gridftp-server < 1.3.0
Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%description gridftpd
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC gridftp server which has a plugin framework.
Current plugins include:

  fileplugin : Standard gridftp server based on Globus globus-ftp-control
  gaclplugin : Enhanced server with support for GACL authorization
  jobplugin  : Classical ARC job submission interface

%package cache-service
Summary:	ARC cache service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Provides:	nordugrid-arc-nox-cache-service = 1.3.0
Obsoletes:	nordugrid-arc-nox-cache-service < 1.3.0
Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%description cache-service
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the ARC cache service. It provides a way to perform
some operations on the A-REX cache remotely. It can be especially helpful
for data management within a pilot job framework.

%package aris
Summary:	ARC LDAP information service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	bdii
Provides:	%{name}-infoindex = %{version}-%{release}
Obsoletes:	%{name}-infoindex < 0.8.2-1
Provides:	%{name}-infosys-ldap = %{version}-%{release}
Obsoletes:	%{name}-infosys-ldap < 1.0.0
Provides:	nordugrid-arc-nox-ldap-infosys = 1.3.0
Obsoletes:	nordugrid-arc-nox-ldap-infosys < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif
Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts

%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%if %{?fedora}%{!?fedora:0} >= 11 || %{?rhel}%{!?rhel:0} >= 6
Requires(post):		policycoreutils-python
Requires(postun):	policycoreutils-python
%endif
%endif

%description aris
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the LDAP based information system for ARC.
This package is not self-contained. it should be pulled in by either
nordugrid-arc-arex to be a part of a local information system or by
nordugrid-arc-egiis to be a part of a EGIIS service.
%package egiis
Summary:	ARC EGIIS service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-aris = %{version}-%{release}
Provides:	nordugrid-arc-nox-giis = 1.3.0
Obsoletes:	nordugrid-arc-nox-giis < 1.3.0
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
Requires(post):		policycoreutils
Requires(postun):	policycoreutils
%endif

%description egiis
 The NorduGrid is a collaboration aiming at development, maintenance
 and support of the free Grid middleware, known as the Advanced Resource
 The EGIIS is the Information Index Service used by ARC, This service is
 used to set up a ldap-based server that local information systems register
 to.

%package ldap-monitor
Summary:	ARC LDAP monitor service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	%{name}-monitor = %{version}-%{release}
Obsoletes:	%{name}-monitor < 1.0.0
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description ldap-monitor
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the LDAP monitor system for ARC.
This package is self-contained. It is used to set up a web-based monitor
which pulls information from a EGIIS and shows it graphically.
%package ws-monitor
Summary:	ARC WS monitor service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description ws-monitor
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced Resource
Connector (ARC).

This package contains the WS monitor system for ARC.
This package is self-contained. It is used to set up a web-based monitor
which pulls information from ISIS and shows it graphically.

Summary:	ARC Remote EXecution service
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	%{name}-hed = %{version}-%{release}
Requires:	%{name}-plugins-needed = %{version}-%{release}
Requires:	mktemp
Requires:	python-twisted-core
Requires:	python-twisted-web
Requires:	%{name}-aris = %{version}-%{release}
Provides:	%{name}-grid-manager = %{version}-%{release}
Obsoletes:	%{name}-grid-manager < 1.0.0
Provides:	%{name}-server = %{version}-%{release}
Obsoletes:	%{name}-server < 1.0.0
Provides:	nordugrid-arc1-arex = 1.3.0
Obsoletes:	nordugrid-arc1-arex < 1.0.0
Provides:	nordugrid-arc-nox-arex = 1.3.0
Obsoletes:	nordugrid-arc-nox-arex < 1.3.0

Requires(post):		chkconfig
Requires(preun):	chkconfig
Requires(preun):	initscripts
Requires(postun):	initscripts
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
The ARC Remote EXecution service (AREX) represents those parts of
the middleware that is responsible for the execution of compute
jobs and the transfer of input or output data.

Summary:	ARC base plugins
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-plugins-base = 1.3.0
Obsoletes:	nordugrid-arc1-plugins-base < 1.0.0
Provides:	nordugrid-arc-nox-plugins-base = 1.3.0
Obsoletes:	nordugrid-arc-nox-plugins-base < 1.3.0
Mattias Ellert's avatar
Mattias Ellert committed
Provides:	nordugrid-arc-plugins-base = %{version}-%{release}
Obsoletes:	nordugrid-arc-plugins-base < 1.0.0-0.b2
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
ARC base plugins. This includes the Message Chain Components (MCCs) and
Data Manager Components (DMCs).

%package plugins-globus
Summary:	ARC Globus plugins
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Provides:	nordugrid-arc1-plugins-globus = 1.3.0
Obsoletes:	nordugrid-arc1-plugins-globus < 1.0.0
Provides:	nordugrid-arc-nox-plugins-globus = 1.3.0
Obsoletes:	nordugrid-arc-nox-plugins-globus < 1.3.0

%description plugins-globus
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
ARC Globus plugins. This includes the Globus dependent Data Manager
Components (DMCs).
Summary:	ARC development files
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	glibmm24-devel
Requires:	glib2-devel
Requires:	libxml2-devel
Requires:	openssl-devel
Provides:	%{name}-libs-devel = %{version}-%{release}
Obsoletes:	%{name}-libs-devel < 1.0.0
Provides:	nordugrid-arc1-devel = 1.3.0
Obsoletes:	nordugrid-arc1-devel < 1.0.0
Provides:	nordugrid-arc-nox-devel = 1.3.0
Obsoletes:	nordugrid-arc-nox-devel < 1.3.0
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
The ARC middleware's core functionality, the Hosting Environment
Daemon (HED) can be extended for novel services. Considerable parts
of a regular installation of a regular installation of the NorduGrid
represent such modules.
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
Summary:	ARC Python wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	python
Requires:	fuse-python
Provides:	nordugrid-arc1-python = 1.3.0
Obsoletes:	nordugrid-arc1-python < 1.0.0
Provides:	nordugrid-arc-nox-python = 1.3.0
Obsoletes:	nordugrid-arc-nox-python < 1.3.0
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
Developers with an interest to integrate the some functionality on
a remote site via an interface compatible with ARC, may find it
preferable to perform that remote invocation from within Python.
While today most services in ARC are associated with computation or
storage, there is no constraint on these applications.
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java}
Summary:	ARC Java wrapper
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	java
Requires:	jpackage-utils
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_gcj}
Requires(post):		java-gcj-compat
Requires(postun):	java-gcj-compat
Mattias Ellert's avatar
Mattias Ellert committed
%endif
Provides:	nordugrid-arc1-java = 1.3.0
Obsoletes:	nordugrid-arc1-java < 1.0.0
Provides:	nordugrid-arc-nox-java = 1.3.0
Obsoletes:	nordugrid-arc-nox-java < 1.3.0
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).
Developers with an interest to integrate the some functionality on
a remote site via an interface compatible with ARC, may find it
preferable to perform that remote invocation from within Java.
While today most services in ARC are associated with computation or
storage, there is no constraint on these applications.
Summary:	ARC dynamic installation of runtime environments
Group:		Applications/Internet
Requires:	wget
Provides:	nordugrid-arc1-janitor = 1.3.0
Obsoletes:	nordugrid-arc1-janitor < 1.0.0
Provides:	nordugrid-arc-nox-janitor = 1.3.0
Obsoletes:	nordugrid-arc-nox-janitor < 1.3.0

%description janitor
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).

For grid computing, a major challenge is to keep the working environments
homogeneous between the sites.  To help this situation, runtime
environments have been developed. Those can be added to or removed from
a site, and this Janitor service helps automating this process.

The Janitor is a recent development and the community to prepare
catalogues of dynamically installable packages still needs to
evolve.

%package doxygen
Summary:	ARC API documentation
Group:		Documentation
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description doxygen
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).

Reference to the ARC programming API. It is prepared with doxygen.

%package gridmap-utils
Summary:	NorduGrid authorization tools
Group:		Applications/Internet
Mattias Ellert's avatar
Mattias Ellert committed
Requires:	perl(Crypt::SSLeay)
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description gridmap-utils
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).

This package contains the ARC authorization machinery.
A prominent tool distributed in this package is the nordugridmap
script to collect user information from the virtual organisations.

%package ca-utils
Summary:	NorduGrid authentication tools
Group:		Applications/Internet
Requires:	fetch-crl
Requires(post):	fetch-crl
Requires(post):	chkconfig
%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
BuildArch:	noarch
%endif

%description ca-utils
The NorduGrid is a collaboration aiming at development, maintenance
and support of the free Grid middleware, known as the Advanced
Resource Connector (ARC).

The nordugrid-arc-ca-utils packages has been obsoleted.
The functionality of the grid-update-crls tool is provided by the
fetch-crl tool in the fetch-crl package.

%setup @fedorasetupopts@
%if %{?fedora}%{!?fedora:0} <= 9 && %{?rhel}%{!?rhel:0} <= 5
# Older versions of SELinux does not have policy for open
cd selinux
sed -e 's/ open / /' -e /open/d -i %{name}-egiis.te
cd -
%endif

%configure --disable-static \
Mattias Ellert's avatar
Mattias Ellert committed
%if ! %{with_java}
     --with-docdir=%{_docdir}/%{name}-%{version}
make %{?_smp_mflags}
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
cd selinux
make -f /usr/share/selinux/devel/Makefile
cd -
%endif

Anders Waananen's avatar
Anders Waananen committed
%check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -p -m 644 debian/%{name}-arex.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-arex
install -p -m 644 debian/%{name}-gridftpd.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-gridftpd
install -p -m 644 debian/%{name}-aris.logrotate \
    $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}-aris
find $RPM_BUILD_ROOT -type f -name \*.la -exec rm -fv '{}' ';'
# Turn off default enabling of the services
Mattias Ellert's avatar
Mattias Ellert committed
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
sed -e 's/\(chkconfig: \)\w*/\1-/' \
    -e '/Default-Start/d' \
    -e 's/\(Default-Stop:\s*\).*/\10 1 2 3 4 5 6/' \
    -i $RPM_BUILD_ROOT%{_initrddir}/*
Mattias Ellert's avatar
Mattias Ellert committed

# Create log directory
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/arc

Mattias Ellert's avatar
Mattias Ellert committed
%find_lang %{name}
Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java} && %{with_gcj}
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/aot-compile-rpm
%endif

%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
cd selinux
mkdir -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
install -p -m 644 %{name}-egiis.pp \
    $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
cd -
%endif

%clean
rm -rf $RPM_BUILD_ROOT

Anders Waananen's avatar
Anders Waananen committed
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

Mattias Ellert's avatar
Mattias Ellert committed
%post plugins-globus -p /sbin/ldconfig

%postun plugins-globus -p /sbin/ldconfig

/sbin/chkconfig --add arched

if [ $1 -eq 0 ]; then
  service arched stop > /dev/null 2>&1
  /sbin/chkconfig --del arched
fi

if [ $1 -ge 1 ]; then
  service arched condrestart > /dev/null 2>&1
fi

%post arex
/sbin/chkconfig --add a-rex

%preun arex
if [ $1 -eq 0 ]; then
  service a-rex stop > /dev/null 2>&1
  /sbin/chkconfig --del a-rex
fi

%postun arex
if [ $1 -ge 1 ]; then
  service a-rex condrestart > /dev/null 2>&1
fi

%post gridftpd
/sbin/chkconfig --add gridftpd

%preun gridftpd
if [ $1 -eq 0 ]; then
  service gridftpd stop > /dev/null 2>&1
  /sbin/chkconfig --del gridftpd
fi

%postun gridftpd
if [ $1 -ge 1 ]; then
  service gridftpd condrestart > /dev/null 2>&1
fi

%post cache-service
/sbin/chkconfig --add cache-service

%preun cache-service
if [ $1 -eq 0 ]; then
  service cache-service stop > /dev/null 2>&1
  /sbin/chkconfig --del cache-service
fi

%postun cache-service
if [ $1 -ge 1 ]; then
  service cache-service condrestart > /dev/null 2>&1
fi

%post aris
/sbin/chkconfig --add grid-infosys
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
semanage port -a -t ldap_port_t -p tcp 2135 2>/dev/null || :
semanage fcontext -a -t slapd_db_t "/var/run/arc/bdii(/.*)?" 2>/dev/null || :
%endif
# Move files to new locations so that the condrestart in postun works
Mattias Ellert's avatar
Mattias Ellert committed
if [ -r /var/lock/subsys/grid-infosys ] && \
   [ ! -r /var/lock/subsys/arc-bdii-update ] ; then
   [ -r /var/lock/subsys/bdii-update ] && \
   mv /var/lock/subsys/bdii-update /var/lock/subsys/arc-bdii-update
   [ -r /var/lock/subsys/bdii-slapd ] && \
   mv /var/lock/subsys/bdii-slapd /var/lock/subsys/arc-bdii-slapd
   [ -r /var/run/bdii-update.pid ] && \
   mv /var/run/bdii-update.pid /var/run/arc-bdii-update.pid
Mattias Ellert's avatar
Mattias Ellert committed
   [ -d /var/run/bdii ] && [ ! -d /var/run/arc/bdii ] && \
Mattias Ellert's avatar
Mattias Ellert committed
   mkdir -p /var/run/arc && mv /var/run/bdii /var/run/arc/bdii || :
Mattias Ellert's avatar
Mattias Ellert committed
   [ -d /var/tmp/bdii ] && [ ! -d /var/tmp/arc/bdii ] && \
Mattias Ellert's avatar
Mattias Ellert committed
   mkdir -p /var/tmp/arc && mv /var/tmp/bdii /var/tmp/arc/bdii || :
Mattias Ellert's avatar
Mattias Ellert committed
   [ -d /var/log/bdii ] && [ ! -d /var/log/arc/bdii ] && \
Mattias Ellert's avatar
Mattias Ellert committed
   mkdir -p /var/log/arc && mv /var/log/bdii /var/log/arc/bdii || :
if [ $1 -eq 0 ]; then
  service grid-infosys stop > /dev/null 2>&1
  /sbin/chkconfig --del grid-infosys
fi

%postun aris
if [ $1 -ge 1 ]; then
  service grid-infosys condrestart > /dev/null 2>&1
fi
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ]; then
  semanage port -d -t ldap_port_t -p tcp 2135 2>/dev/null || :
  semanage fcontext -d -t slapd_db_t "/var/run/arc/bdii(/.*)?" 2>/dev/null || :
%triggerun aris -- bdii
service grid-infosys condrestart > /dev/null 2>&1

%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
/usr/sbin/semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-egiis.pp > /dev/null 2>&1 || :
/sbin/restorecon %{_sbindir}/arc-infoindex-relay
%endif

%postun egiis
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
if [ $1 -eq 0 ] ; then
  /usr/sbin/semodule -r %{name}-egiis > /dev/null 2>&1 || :
fi
%endif

Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java} && %{with_gcj}
Mattias Ellert's avatar
Mattias Ellert committed
%post java
[ -x %{_bindir}/rebuild-gcj-db ] && %{_bindir}/rebuild-gcj-db
%endif

Mattias Ellert's avatar
Mattias Ellert committed
%if %{with_java} && %{with_gcj}
Mattias Ellert's avatar
Mattias Ellert committed
%postun java
[ -x %{_bindir}/rebuild-gcj-db ] && %{_bindir}/rebuild-gcj-db
%endif
Mattias Ellert's avatar
Mattias Ellert committed
# Enable and start CRL updates via cron for backward compatibility
Mattias Ellert's avatar
Mattias Ellert committed
service fetch-crl-cron start > /dev/null 2>&1
Mattias Ellert's avatar
Mattias Ellert committed
%files -f %{name}.lang
%defattr(-,root,root,-)
%{_libdir}/libarcclient.so.*
%{_libdir}/libarccommon.so.*
%{_libdir}/libarccredential.so.*
%{_libdir}/libarccredentialstore.so.*
%{_libdir}/libarccrypto.so.*
%{_libdir}/libarcdata2.so.*
%{_libdir}/libarcdbxml.so.*
%{_libdir}/libarcloader.so.*
%{_libdir}/libarcmessage.so.*
%{_libdir}/libarcsecurity.so.*
%{_libdir}/libarcws.so.*
%{_libdir}/libarcwssecurity.so.*
%{_libdir}/libarcxmlsec.so.*
# We need to have libmodcrypto.so close to libarccrypto
%{_libdir}/%{pkgdir}/libmodcrypto.so
%{_libdir}/%{pkgdir}/libmodcrypto.apd
# We need to have libmodcredential.so close to libarccredential
%{_libdir}/%{pkgdir}/libmodcredential.so
%{_libdir}/%{pkgdir}/libmodcredential.apd
Anders Waananen's avatar
Anders Waananen committed
%{_libexecdir}/%{pkgdir}/arc-file-access
%{_bindir}/ngconfigtest
%doc %{_mandir}/man1/ngconfigtest.1*
%dir %{_datadir}/%{pkgdir}/examples
%doc %{_datadir}/%{pkgdir}/examples/arc.conf.template
Mattias Ellert's avatar
Mattias Ellert committed
%{_datadir}/%{pkgdir}/schema
%dir %{_datadir}/%{pkgdir}
%files client
%defattr(-,root,root,-)
%{_bindir}/arccat
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcclean
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arccp
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcecho
%{_bindir}/arcget
%{_bindir}/arcinfo
%{_bindir}/arckill
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcls
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcmigrate
%{_bindir}/arcproxy
%{_bindir}/arcrenew
%{_bindir}/arcresub
%{_bindir}/arcresume
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcrm
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcslcs
%{_bindir}/arcsrmping
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcstat
%{_bindir}/arcsub
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/arcsync
%{_bindir}/arctest
%{_bindir}/arcwsrf
Mattias Ellert's avatar
Mattias Ellert committed
%{_bindir}/isistest
%{_bindir}/perftest
%{_bindir}/saml_assertion_init
%{_bindir}/ngclient2arc
Anders Waananen's avatar
Anders Waananen committed
%config(noreplace) %{_sysconfdir}/%{pkgdir}/client.conf
%doc %{_datadir}/%{pkgdir}/examples/client.conf
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arccat.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arcclean.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arccp.1*
%doc %{_mandir}/man1/arcecho.1*
%doc %{_mandir}/man1/arcget.1*
%doc %{_mandir}/man1/arcinfo.1*
%doc %{_mandir}/man1/arckill.1*
%doc %{_mandir}/man1/arcls.1*
%doc %{_mandir}/man1/arcmigrate.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arcproxy.1*
%doc %{_mandir}/man1/arcrenew.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arcresub.1*
%doc %{_mandir}/man1/arcresume.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/arcrm.1*
%doc %{_mandir}/man1/arcslcs.1*
%doc %{_mandir}/man1/arcstat.1*
%doc %{_mandir}/man1/arcsrmping.1*
%doc %{_mandir}/man1/arcsub.1*
%doc %{_mandir}/man1/arcsync.1*
%doc %{_mandir}/man1/arctest.1*
%doc %{_mandir}/man1/arcwsrf.1*
%doc %{_mandir}/man1/isistest.1*
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man1/perftest.1.gz
%doc %{_mandir}/man1/saml_assertion_init.1*
%doc %{_mandir}/man1/ngclient2arc.1*
%defattr(-,root,root,-)
%{_initrddir}/arched
Mattias Ellert's avatar
Mattias Ellert committed
%{_libdir}/%{pkgdir}/libecho.so
%{_libdir}/%{pkgdir}/libecho.apd
%{_datadir}/%{pkgdir}/profiles
%doc %{_datadir}/%{pkgdir}/examples/config
%doc %{_datadir}/%{pkgdir}/examples/echo
Mattias Ellert's avatar
Mattias Ellert committed
%doc %{_mandir}/man8/arched.8*
%doc %{_mandir}/man5/arc.conf.5*
%if %{?fedora}%{!?fedora:0} >= 5 || %{?rhel}%{!?rhel:0} >= 5
%files chelonia
%defattr(-,root,root,-)
%{_bindir}/arcfs
%{_bindir}/chelonia
%doc %{_mandir}/man1/chelonia.1*
%{python_sitelib}/storage
%doc %{_datadir}/%{pkgdir}/examples/storage_service.xml.example
%files hopi
%defattr(-,root,root,-)
%{_libdir}/%{pkgdir}/libhopi.so
%{_libdir}/%{pkgdir}/libhopi.apd
%doc %{_datadir}/%{pkgdir}/examples/hopi

%files isis
%defattr(-,root,root,-)
%{_libdir}/%{pkgdir}/libisis.so
%{_libdir}/%{pkgdir}/libisis.apd
%files gridftpd
Anders Waananen's avatar
Anders Waananen committed
%defattr(-,root,root,-)
%{_libdir}/%{pkgdir}/jobplugin.*
%{_libdir}/%{pkgdir}/gaclplugin.*
%{_libdir}/%{pkgdir}/fileplugin.*
Mattias Ellert's avatar
Mattias Ellert committed
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-gridftpd
%files aris
Anders Waananen's avatar
Anders Waananen committed
%defattr(-,root,root,-)
%{_datadir}/%{pkgdir}/grid-infosys-bdii4
%{_datadir}/%{pkgdir}/grid-infosys-bdii5
%{_datadir}/%{pkgdir}/glue-generator.pl
%{_datadir}/%{pkgdir}/glite-info-provider-ldap
%{_datadir}/%{pkgdir}/grid-info-soft-register
%{_datadir}/%{pkgdir}/qju.pl
%{_datadir}/%{pkgdir}/cluster.pl
%{_datadir}/%{pkgdir}/se.pl
%{_datadir}/%{pkgdir}/LRMS.pm
%{_datadir}/%{pkgdir}/Shared.pm
%{_datadir}/%{pkgdir}/ConfigParser.pm
%{_datadir}/%{pkgdir}/config_parser_compat.sh
Mattias Ellert's avatar
Mattias Ellert committed
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-aris
%files egiis
Anders Waananen's avatar
Anders Waananen committed
%defattr(-,root,root,-)
%{_sbindir}/arc-infoindex-relay
%{_sbindir}/arc-infoindex-server
%{_mandir}/man8/arc-infoindex-relay.8*
%{_mandir}/man8/arc-infoindex-server.8*
%{_libdir}/%{pkgdir}/arc-infoindex-slapd-wrapper.so
%{_libdir}/%{pkgdir}/arc-infoindex-slapd-wrapper.apd
%if %{?fedora}%{!?fedora:0} >= 6 || %{?rhel}%{!?rhel:0} >= 5
%{_datadir}/selinux/packages/%{name}
%endif
%files ldap-monitor
%defattr(-,root,root,-)
%{_datadir}/%{pkgdir}/ldap-monitor/*
%doc %{_mandir}/man7/ldap-monitor.7*
%files ws-monitor
%defattr(-,root,root,-)
%{_datadir}/%{pkgdir}/ws-monitor/*
%doc %{_mandir}/man7/ws-monitor.7*
%files cache-service
%{_initrddir}/cache-service
%{_libdir}/%{pkgdir}/libcacheservice.so
%{_libdir}/%{pkgdir}/libcacheservice.apd

%defattr(-,root,root,-)
%{_initrddir}/a-rex
Mattias Ellert's avatar
Mattias Ellert committed
%{_libexecdir}/%{pkgdir}/cache-clean
%{_libexecdir}/%{pkgdir}/cache-list
%{_libexecdir}/%{pkgdir}/jura
Anders Waananen's avatar
Anders Waananen committed
%{_libexecdir}/%{pkgdir}/downloader
Mattias Ellert's avatar
Mattias Ellert committed
%{_libexecdir}/%{pkgdir}/gm-jobs
%{_libexecdir}/%{pkgdir}/gm-kick
Anders Waananen's avatar
Anders Waananen committed
%{_libexecdir}/%{pkgdir}/smtp-send
%{_libexecdir}/%{pkgdir}/smtp-send.sh
Mattias Ellert's avatar
Mattias Ellert committed
%{_libexecdir}/%{pkgdir}/uploader
%{_libexecdir}/%{pkgdir}/inputcheck
%{_libexecdir}/%{pkgdir}/arc-ur-logger
%{_libexecdir}/%{pkgdir}/arc-ur-registrant
%{_datadir}/%{pkgdir}/cancel-*-job
%{_datadir}/%{pkgdir}/scan-*-job
%{_datadir}/%{pkgdir}/submit-*-job
%{_datadir}/%{pkgdir}/finish-condor-job
%{_libexecdir}/%{pkgdir}/DataStagingDelivery
%{_datadir}/%{pkgdir}/DGAuthplug.py*
%{_datadir}/%{pkgdir}/DGBridgeDataPlugin.py*
%{_datadir}/%{pkgdir}/DGLog2XML.py*
Mattias Ellert's avatar
Mattias Ellert committed
%{_libdir}/%{pkgdir}/libarex.so
%{_libdir}/%{pkgdir}/libarex.apd
%{_datadir}/%{pkgdir}/CEinfo.pl
%{_datadir}/%{pkgdir}/ARC0mod.pm
%{_datadir}/%{pkgdir}/FORKmod.pm
%{_datadir}/%{pkgdir}/Fork.pm
%{_datadir}/%{pkgdir}/SGEmod.pm
%{_datadir}/%{pkgdir}/SGE.pm
%{_datadir}/%{pkgdir}/LL.pm
%{_datadir}/%{pkgdir}/LSF.pm
%{_datadir}/%{pkgdir}/PBS.pm
%{_datadir}/%{pkgdir}/Condor.pm
%{_datadir}/%{pkgdir}/SLURM.pm
%{_datadir}/%{pkgdir}/GridFactory.pm
%{_datadir}/%{pkgdir}/DGBridge.pm
%{_datadir}/%{pkgdir}/XmlPrinter.pm
%{_datadir}/%{pkgdir}/InfosysHelper.pm
%{_datadir}/%{pkgdir}/LdifPrinter.pm
%{_datadir}/%{pkgdir}/GLUE2xmlPrinter.pm