e79aa75
%if %{?fedora}%{!?fedora:0} >= 25 || %{?rhel}%{!?rhel:0} >= 8
e79aa75
%global use_systemd 1
e79aa75
%else
e79aa75
%global use_systemd 0
e79aa75
%endif
e79aa75
b4452ff
Name:		globus-gram-job-manager-fork
b4452ff
%global _name %(tr - _ <<< %{name})
80eba4b
Version:	3.3
864ab92
Release:	4%{?dist}
146e544
Summary:	Grid Community Toolkit - Fork Job Manager Support
b4452ff
1586136
License:	Apache-2.0
146e544
URL:		https://github.com/gridcf/gct/
146e544
Source:		https://repo.gridcf.org/gct6/sources/%{_name}-%{version}.tar.gz
146e544
Source8:	README
146e544
f6c341d
BuildRequires:	make
146e544
BuildRequires:	gcc
146e544
BuildRequires:	globus-common-devel >= 15
146e544
BuildRequires:	globus-xio-devel >= 3
146e544
BuildRequires:	globus-scheduler-event-generator-devel >= 4
146e544
BuildRequires:	globus-gram-protocol-devel >= 11
146e544
BuildRequires:	perl-generators
efcf906
BuildRequires:	perl-interpreter
146e544
%if %{use_systemd}
146e544
BuildRequires:	systemd
146e544
%endif
b4452ff
283836c
#		A requirement on globus-gram-job-manager would make sense.
283836c
#		However, that would create a circular build dependency when
283836c
#		building the globus-gram-job-manager package, since the test
283836c
#		suite for that package requires globus-gram-job-manager-fork
283836c
#		to run.
283836c
# Requires:	globus-gram-job-manager >= 13
b4452ff
Requires:	globus-gram-job-manager-scripts >= 4
b4452ff
Requires:	globus-gass-cache-program >= 5
b4452ff
Requires:	globus-gatekeeper >= 9
283836c
Requires:	%{name}-setup = %{version}-%{release}
b4452ff
b4452ff
%package setup-poll
146e544
Summary:	Grid Community Toolkit - Fork Job Manager Support using polling
b4452ff
BuildArch:	noarch
283836c
Provides:	%{name}-setup = %{version}-%{release}
b4452ff
Requires:	%{name} = %{version}-%{release}
b4452ff
b4452ff
Requires(preun):	globus-gram-job-manager-scripts >= 4
b4452ff
b4452ff
%package setup-seg
146e544
Summary:	Grid Community Toolkit - Fork Job Manager Support using SEG
283836c
Provides:	%{name}-setup = %{version}-%{release}
b4452ff
Requires:	%{name}%{?_isa} = %{version}-%{release}
283836c
Requires:	globus-scheduler-event-generator-progs >= 4
b4452ff
b4452ff
Requires(preun):	globus-gram-job-manager-scripts >= 4
b4452ff
Requires(preun):	globus-scheduler-event-generator-progs >= 4
b4452ff
Requires(postun):	globus-scheduler-event-generator-progs >= 4
e79aa75
%if %{use_systemd}
146e544
%{?systemd_requires}
e79aa75
%else
e79aa75
Requires(preun):	initscripts
b4452ff
Requires(postun):	initscripts
e79aa75
%endif
b4452ff
b4452ff
%description
146e544
The Grid Community Toolkit (GCT) is an open source software toolkit used for
146e544
building grid systems and applications. It is a fork of the Globus Toolkit
146e544
originally created by the Globus Alliance. It is supported by the Grid
146e544
Community Forum (GridCF) that provides community-based support for core
146e544
software packages in grid computing.
b4452ff
b4452ff
The %{name} package contains:
b4452ff
Fork Job Manager Support
b4452ff
b4452ff
%description setup-poll
146e544
The Grid Community Toolkit (GCT) is an open source software toolkit used for
146e544
building grid systems and applications. It is a fork of the Globus Toolkit
146e544
originally created by the Globus Alliance. It is supported by the Grid
146e544
Community Forum (GridCF) that provides community-based support for core
146e544
software packages in grid computing.
b4452ff
b4452ff
The %{name}-setup-poll package contains:
b4452ff
Fork Job Manager Support using polling to monitor job state
b4452ff
b4452ff
%description setup-seg
146e544
The Grid Community Toolkit (GCT) is an open source software toolkit used for
146e544
building grid systems and applications. It is a fork of the Globus Toolkit
146e544
originally created by the Globus Alliance. It is supported by the Grid
146e544
Community Forum (GridCF) that provides community-based support for core
146e544
software packages in grid computing.
b4452ff
b4452ff
The %{name}-setup-seg package contains:
b4452ff
Fork Job Manager Support using the scheduler event generator to monitor job
b4452ff
state
b4452ff
b4452ff
%prep
b4452ff
%setup -q -n %{_name}-%{version}
b4452ff
b4452ff
%build
283836c
# Reduce overlinking
283836c
export LDFLAGS="-Wl,--as-needed -Wl,-z,defs %{?__global_ldflags}"
b4452ff
b4452ff
export MPIEXEC=no
b4452ff
export MPIRUN=no
283836c
%configure --disable-static \
146e544
	   --includedir=%{_includedir}/globus \
146e544
	   --libexecdir=%{_datadir}/globus \
283836c
	   --docdir=%{_pkgdocdir} \
283836c
	   --with-perlmoduledir=%{perl_vendorlib} \
ad192b0
	   --with-globus-state-dir=%{_localstatedir}/log/globus
b4452ff
b4452ff
# Reduce overlinking
41db056
sed 's!CC \(.*-shared\) !CC \\\${wl}--as-needed \1 !' -i libtool
b4452ff
efcf906
%make_build
b4452ff
b4452ff
%install
efcf906
%make_install
b4452ff
283836c
# Remove libtool archives (.la files)
283836c
rm %{buildroot}%{_libdir}/*.la
b4452ff
b4452ff
# Remove jobmanager-fork from install dir - leave it for admin configuration
146e544
rm %{buildroot}%{_sysconfdir}/grid-services/jobmanager-fork
b4452ff
b4452ff
# Install README file
1fd85f4
install -m 644 -p %{SOURCE8} %{buildroot}%{_pkgdocdir}/README
b4452ff
efcf906
# Remove license file from pkgdocdir
efcf906
rm %{buildroot}%{_pkgdocdir}/GLOBUS_LICENSE
41db056
b4452ff
%preun setup-poll
b4452ff
if [ $1 -eq 0 ]; then
b4452ff
    globus-gatekeeper-admin -d jobmanager-fork-poll > /dev/null 2>&1 || :
b4452ff
fi
b4452ff
b4452ff
%preun setup-seg
b4452ff
if [ $1 -eq 0 ]; then
b4452ff
    globus-gatekeeper-admin -d jobmanager-fork-seg > /dev/null 2>&1 || :
e79aa75
%if %{use_systemd}
e79aa75
    systemctl --no-reload disable globus-scheduler-event-generator@fork > /dev/null 2>&1 || :
e79aa75
    systemctl stop globus-scheduler-event-generator@fork > /dev/null 2>&1 || :
e79aa75
%else
b4452ff
    /sbin/service globus-scheduler-event-generator stop fork > /dev/null 2>&1 || :
e79aa75
%endif
b4452ff
    globus-scheduler-event-generator-admin -d fork > /dev/null 2>&1 || :
b4452ff
fi
b4452ff
146e544
%ldconfig_post setup-seg
b4452ff
b4452ff
%postun setup-seg
81c51d3
%{?ldconfig}
e79aa75
if [ $1 -ge 1 ]; then
e79aa75
%if %{use_systemd}
146e544
    systemctl try-restart globus-scheduler-event-generator@fork > /dev/null 2>&1 || :
e79aa75
%else
b4452ff
    /sbin/service globus-scheduler-event-generator condrestart fork > /dev/null 2>&1 || :
e79aa75
%endif
b4452ff
fi
b4452ff
283836c
%files
283836c
%dir %{perl_vendorlib}/Globus
283836c
%dir %{perl_vendorlib}/Globus/GRAM
283836c
%dir %{perl_vendorlib}/Globus/GRAM/JobManager
283836c
%{perl_vendorlib}/Globus/GRAM/JobManager/fork.pm
283836c
%dir %{_sysconfdir}/globus
b4452ff
%config(noreplace) %{_sysconfdir}/globus/globus-fork.conf
1fd85f4
%dir %{_pkgdocdir}
1fd85f4
%doc %{_pkgdocdir}/README
efcf906
%license GLOBUS_LICENSE
b4452ff
b4452ff
%files setup-poll
b4452ff
%config(noreplace) %{_sysconfdir}/grid-services/available/jobmanager-fork-poll
b4452ff
283836c
%files setup-seg
41db056
# This is a loadable module (plugin)
283836c
%{_libdir}/libglobus_seg_fork.so
283836c
%{_sbindir}/globus-fork-starter
283836c
%doc %{_mandir}/man8/globus-fork-starter.8*
b4452ff
%config(noreplace) %{_sysconfdir}/grid-services/available/jobmanager-fork-seg
b4452ff
%config(noreplace) %{_sysconfdir}/globus/scheduler-event-generator/available/fork
b4452ff
b4452ff
%changelog
864ab92
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
864ab92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
864ab92
73ae659
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
73ae659
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
73ae659
a1358d0
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.3-2
a1358d0
- Perl 5.36 rebuild
a1358d0
77161e1
* Tue May 31 2022 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3-2
77161e1
- Rebuild with correct perl version (EPEL 8)
77161e1
80eba4b
* Wed May 25 2022 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3-1
80eba4b
- New GCT release v6.2.20220524
80eba4b
- Drop patches included in the release
80eba4b
85095a3
* Sat Mar 12 2022 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.2-3
85095a3
- Fix some compiler warnings
85095a3
c3992ae
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2-2
c3992ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
c3992ae
0d79cc6
* Thu Aug 26 2021 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.2-1
0d79cc6
- Typo fixes
0d79cc6
09f2b40
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-9
09f2b40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
09f2b40
8200f4a
* Sun May 23 2021 Jitka Plesnikova <jplesnik@redhat.com> - 3.1-8
8200f4a
- Perl 5.34 rebuild
8200f4a
c3c5e44
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-7
c3c5e44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
c3c5e44
efcf906
* Sun Dec 13 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.1-6
efcf906
- Specfile updates
efcf906
- Add BuildRequires perl-interpreter
efcf906
- Drop ancient Obsoletes tags
efcf906
22be3d0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
22be3d0
- Second attempt - Rebuilt for
22be3d0
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
22be3d0
2eec073
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-4
2eec073
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2eec073
005e263
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.1-3
005e263
- Perl 5.32 rebuild
005e263
e0bee35
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
e0bee35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e0bee35
4ac8b2e
* Fri Aug 30 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.1-1
4ac8b2e
- Add AC_CONFIG_MACRO_DIR and ACLOCAL_AMFLAGS
4ac8b2e
80a3c46
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-5
80a3c46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
80a3c46
bbcf7f6
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 3.0-4
bbcf7f6
- Perl 5.30 rebuild
bbcf7f6
81c51d3
* Wed Feb 06 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0-3
81c51d3
- Use ? with ldconfig macro
81c51d3
56c6aa7
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-2
56c6aa7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
56c6aa7
146e544
* Thu Sep 13 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0-1
146e544
- Switch upstream to Grid Community Toolkit
146e544
- First Grid Community Toolkit release
146e544
406997b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-9
406997b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
406997b
3011aab
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 2.6-8
3011aab
- Perl 5.28 rebuild
3011aab
2a0780f
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-7
2a0780f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2a0780f
ff6304d
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-6
ff6304d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ff6304d
cef54c1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-5
cef54c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cef54c1
aad0bdb
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.6-4
aad0bdb
- Perl 5.26 rebuild
aad0bdb
dca5371
* Mon Mar 27 2017 Mattias Ellert <mattias.ellert@physics.uu.se> - 2.6-3
dca5371
- EPEL 5 End-Of-Life specfile clean-up
dca5371
  - Remove Group and BuildRoot tags
dca5371
  - Remove _pkgdocdir macro definition
dca5371
  - Don't clear the buildroot in the install section
dca5371
  - Remove the clean section
dca5371
d99a276
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-2
d99a276
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d99a276
88df2f5
* Fri Nov 04 2016 Mattias Ellert <mattias.ellert@physics.uu.se> - 2.6-1
88df2f5
- GT6 update: Updated man pages
88df2f5
e79aa75
* Sat Sep 03 2016 Mattias Ellert <mattias.ellert@physics.uu.se> - 2.5-1
e79aa75
- GT6 update
e79aa75
- Convert to systemd (Fedora 25+)
e79aa75
98b293c
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.4-6
98b293c
- Perl 5.24 rebuild
98b293c
6e28ed8
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-5
6e28ed8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6e28ed8
2a6b984
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
2a6b984
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2a6b984
72aeb93
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 2.4-3
72aeb93
- Perl 5.22 rebuild
72aeb93
41db056
* Fri Jan 23 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.4-2
41db056
- Implement updated license packaging guidelines
41db056
283836c
* Fri Sep 12 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 2.4-1
283836c
- Update to Globus Toolkit 6.0
283836c
- Drop GPT build system and GPT packaging metadata
283836c
12a4e4c
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.5-12
12a4e4c
- Perl 5.20 rebuild
12a4e4c
5c2c623
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-11
5c2c623
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
5c2c623
9c8515b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-10
9c8515b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9c8515b
Brent Baude c9661ed
* Mon May 26 2014 Brent Baude <baude@us.ibm.com> - 1.5-9
3a19c1c
- Replace arch def of ppc64 with power64 macro for ppc64le enablement
Brent Baude c9661ed
ad192b0
* Thu Jan 09 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.5-8
ad192b0
- Fix logfile location
ad192b0
76a95a7
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-7
76a95a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
76a95a7
1fd85f4
* Sun Jul 28 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.5-6
1fd85f4
- Implement updated packaging guidelines
1fd85f4
0facb34
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.5-5
0facb34
- Perl 5.18 rebuild
0facb34
2ee4493
* Tue May 21 2013 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.5-4
2ee4493
- Add aarch64 to the list of 64 bit platforms
2ee4493
273bf6a
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
273bf6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
273bf6a
08b8258
* Thu Dec 06 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.5-2
08b8258
- Specfile clean-up
08b8258
b4452ff
* Sat Apr 28 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.5-1
b4452ff
- Update to Globus Toolkit 5.2.1
b4452ff
- Drop patch globus-gram-jobmanager-fork-desc.patch (fixed upstream)
b4452ff
b4452ff
* Tue Jan 24 2012 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0-2
b4452ff
- Fix broken links in README file
b4452ff
b4452ff
* Thu Dec 15 2011 Mattias Ellert <mattias.ellert@fysast.uu.se> - 1.0-1
b4452ff
- Autogenerated