voms-clients-java/voms-clients-java.spec
Mattias Ellert 8a84461d4a Update to version 3.3.2
Drop patches voms-clients-java-use-a-more-sensible-timeout.patch and
  voms-clients-java-change-default-proxy-cert-key-length-to-2048-bits.patch
2020-10-14 11:13:36 +02:00

237 lines
9.4 KiB
RPMSpec

Name: voms-clients-java
Version: 3.3.2
Release: 1%{?dist}
Summary: Virtual Organization Membership Service Java clients
License: ASL 2.0
URL: https://wiki.italiangrid.it/VOMS
Source0: https://github.com/italiangrid/voms-clients/archive/v%{version}/%{name}-%{version}.tar.gz
# These are build instructions for ant generated from the maven
# build instructions using the maven ant plugin.
# These are used for building on EPEL 6 since there is no maven
# available there.
Source1: build.xml
Source2: maven-build.xml
Source3: maven-build.properties
BuildArch: noarch
# There is no jakarta-commons-io for ppc64 in EPEL6
ExcludeArch: ppc64
BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: jakarta-commons-cli
BuildRequires: jakarta-commons-io
BuildRequires: junit4
BuildRequires: voms-api-java >= 3.3.2
Requires: java >= 1:1.8
Requires: jpackage-utils
Requires: jakarta-commons-cli
Requires: jakarta-commons-io
Requires: voms-api-java >= 3.3.2
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
# Older versions of voms-clients did not have alternatives
Conflicts: voms-clients < 2.0.12
Provides: voms-clients = %{version}-%{release}
Provides: voms-clients3 = %{version}-%{release}
Obsoletes: voms-clients3 < 3.1
%description
The Virtual Organization Membership Service (VOMS) is an attribute authority
which serves as central repository for VO user authorization information,
providing support for sorting users into group hierarchies, keeping track of
their roles and other attributes in order to issue trusted attribute
certificates and SAML assertions used in the Grid environment for
authorization purposes.
This package provides the Java version of the command line clients for VOMS:
voms-proxy-init, voms-proxy-destroy and voms-proxy-info.
%prep
%setup -q -n voms-clients-%{version}
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
%build
export CLASSPATH=$(build-classpath voms-api-java canl bcpkix-1.58 bcprov-1.58 commons-cli commons-io junit4)
%ant -Dbuild.sysclasspath=last package
%install
mkdir -p %{buildroot}%{_javadir}
install -m 644 target/voms-clients-%{version}.jar \
%{buildroot}%{_javadir}/voms-clients.jar
mkdir -p %{buildroot}%{_mavenpomdir}
install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-voms-clients.pom
%add_to_maven_depmap org.italiangrid voms-clients %{version} JPP voms-clients
mkdir -p %{buildroot}%{_bindir}
cat > %{buildroot}%{_bindir}/voms-proxy-init3 << EOF
#!/bin/sh
VOMS_CLIENTS_JAVA_OPTIONS=\${VOMS_CLIENTS_JAVA_OPTIONS:-"-XX:+UseSerialGC -Xmx16m"}
java \$VOMS_CLIENTS_JAVA_OPTIONS -cp \$(build-classpath voms-clients voms-api-java canl bcpkix-1.58 bcprov-1.58 commons-cli commons-io) org.italiangrid.voms.clients.VomsProxyInit "\$@"
EOF
chmod 755 %{buildroot}%{_bindir}/voms-proxy-init3
cat > %{buildroot}%{_bindir}/voms-proxy-info3 << EOF
#!/bin/sh
VOMS_CLIENTS_JAVA_OPTIONS=\${VOMS_CLIENTS_JAVA_OPTIONS:-"-XX:+UseSerialGC -Xmx16m"}
java \$VOMS_CLIENTS_JAVA_OPTIONS -cp \$(build-classpath voms-clients voms-api-java canl bcpkix-1.58 bcprov-1.58 commons-cli commons-io) org.italiangrid.voms.clients.VomsProxyInfo "\$@"
EOF
chmod 755 %{buildroot}%{_bindir}/voms-proxy-info3
cat > %{buildroot}%{_bindir}/voms-proxy-destroy3 << EOF
#!/bin/sh
VOMS_CLIENTS_JAVA_OPTIONS=\${VOMS_CLIENTS_JAVA_OPTIONS:-"-XX:+UseSerialGC -Xmx16m"}
java \$VOMS_CLIENTS_JAVA_OPTIONS -cp \$(build-classpath voms-clients voms-api-java canl bcpkix-1.58 bcprov-1.58 commons-cli commons-io) org.italiangrid.voms.clients.VomsProxyDestroy "\$@"
EOF
chmod 755 %{buildroot}%{_bindir}/voms-proxy-destroy3
touch %{buildroot}%{_bindir}/voms-proxy-init
chmod 755 %{buildroot}%{_bindir}/voms-proxy-init
touch %{buildroot}%{_bindir}/voms-proxy-info
chmod 755 %{buildroot}%{_bindir}/voms-proxy-info
touch %{buildroot}%{_bindir}/voms-proxy-destroy
chmod 755 %{buildroot}%{_bindir}/voms-proxy-destroy
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m 644 man/voms-proxy-init.1 \
%{buildroot}%{_mandir}/man1/voms-proxy-init3.1
install -p -m 644 man/voms-proxy-info.1 \
%{buildroot}%{_mandir}/man1/voms-proxy-info3.1
install -p -m 644 man/voms-proxy-destroy.1 \
%{buildroot}%{_mandir}/man1/voms-proxy-destroy3.1
touch %{buildroot}%{_mandir}/man1/voms-proxy-init.1
touch %{buildroot}%{_mandir}/man1/voms-proxy-info.1
touch %{buildroot}%{_mandir}/man1/voms-proxy-destroy.1
mkdir -p %{buildroot}%{_mandir}/man5
install -p -m 644 man/vomsdir.5 %{buildroot}%{_mandir}/man5/vomsdir.5
install -p -m 644 man/vomses.5 %{buildroot}%{_mandir}/man5/vomses.5
%post
%update_maven_depmap
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-init \
voms-proxy-init %{_bindir}/voms-proxy-init3 90 \
--slave %{_mandir}/man1/voms-proxy-init.1.gz voms-proxy-init-man \
%{_mandir}/man1/voms-proxy-init3.1.gz
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-info \
voms-proxy-info %{_bindir}/voms-proxy-info3 90 \
--slave %{_mandir}/man1/voms-proxy-info.1.gz voms-proxy-info-man \
%{_mandir}/man1/voms-proxy-info3.1.gz
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-destroy \
voms-proxy-destroy %{_bindir}/voms-proxy-destroy3 90 \
--slave %{_mandir}/man1/voms-proxy-destroy.1.gz voms-proxy-destroy-man \
%{_mandir}/man1/voms-proxy-destroy3.1.gz
%postun
%update_maven_depmap
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove voms-proxy-init \
%{_bindir}/voms-proxy-init3
%{_sbindir}/update-alternatives --remove voms-proxy-info \
%{_bindir}/voms-proxy-info3
%{_sbindir}/update-alternatives --remove voms-proxy-destroy \
%{_bindir}/voms-proxy-destroy3
fi
%triggerpostun -- voms-clients3
# Uninstalling the UMD voms-clients3 package will remove the alternatives
# for voms-clients-java - put them back in this triggerpostun script
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-init \
voms-proxy-init %{_bindir}/voms-proxy-init3 90 \
--slave %{_mandir}/man1/voms-proxy-init.1.gz voms-proxy-init-man \
%{_mandir}/man1/voms-proxy-init3.1.gz
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-info \
voms-proxy-info %{_bindir}/voms-proxy-info3 90 \
--slave %{_mandir}/man1/voms-proxy-info.1.gz voms-proxy-info-man \
%{_mandir}/man1/voms-proxy-info3.1.gz
%{_sbindir}/update-alternatives --install %{_bindir}/voms-proxy-destroy \
voms-proxy-destroy %{_bindir}/voms-proxy-destroy3 90 \
--slave %{_mandir}/man1/voms-proxy-destroy.1.gz voms-proxy-destroy-man \
%{_mandir}/man1/voms-proxy-destroy3.1.gz
%files
%{_javadir}/voms-clients.jar
%{_mavenpomdir}/JPP-voms-clients.pom
%config(noreplace) %{_mavendepmapfragdir}/%{name}
%{_bindir}/voms-proxy-destroy3
%{_bindir}/voms-proxy-info3
%{_bindir}/voms-proxy-init3
%ghost %{_bindir}/voms-proxy-destroy
%ghost %{_bindir}/voms-proxy-info
%ghost %{_bindir}/voms-proxy-init
%{_mandir}/man1/voms-proxy-destroy3.1*
%{_mandir}/man1/voms-proxy-info3.1*
%{_mandir}/man1/voms-proxy-init3.1*
%ghost %{_mandir}/man1/voms-proxy-destroy.1*
%ghost %{_mandir}/man1/voms-proxy-info.1*
%ghost %{_mandir}/man1/voms-proxy-init.1*
%{_mandir}/man5/vomsdir.5*
%{_mandir}/man5/vomses.5*
%doc AUTHORS README.md
%license LICENSE
%changelog
* Wed Oct 14 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.2-1
- Update to version 3.3.2
- Drop patches voms-clients-java-use-a-more-sensible-timeout.patch and
voms-clients-java-change-default-proxy-cert-key-length-to-2048-bits.patch
* Wed Oct 31 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.0-3
- Change default proxy cert key length to 2048 bits
- Use a more sensible timeout
* Tue Apr 10 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.0-2
- Add trigger scriptlet to restore removed alternatives
* Thu Feb 08 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.3.0-1
- Build against bouncycastle1.58
- Update to version 3.3.0
- Drop patches voms-clients-java-except.patch and -canl-2.5.patch
* Thu Jan 11 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0.7-6
- Add Provides/Obsoletes voms-clients3
* Fri Jan 05 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0.7-5
- Adapt to canl-java 2.5
- Create EPEL 6 package using the maven ant plugin
* Tue Aug 08 2017 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0.7-4
- Don't do assembly
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Sep 10 2016 Mattias Ellert <mattias.ellert@physics.uu.se> - 3.0.7-1
- Update to version 3.0.7
- Drop patch voms-clients-java-javadoc.patch
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Jul 11 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.6-3
- Fix javadoc warnings
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Mar 18 2015 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.6-1
- Update to version 3.0.6
- Implement new license packaging guidelines
- Add virtual provides voms-clients (the old voms-clients package was
renamed voms-clients-cpp)
* Mon Nov 17 2014 Mattias Ellert <mattias.ellert@fysast.uu.se> - 3.0.5-1
- Initial build