-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from italiangrid/develop
Put 3.3.0 in master
- Loading branch information
Showing
1,500 changed files
with
74,101 additions
and
61,973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rpmbuild | ||
*.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# RPM packaging for VOMS Admin server | ||
|
||
## Usage | ||
|
||
To build packages, run: | ||
|
||
./build-rpm.sh | ||
|
||
To cleanup, run: | ||
|
||
./clean.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/bash | ||
set -ex | ||
name=voms-admin-server | ||
|
||
base_dir=../../ | ||
source_dir=sources | ||
rpmbuild_dir=$(pwd)/rpmbuild | ||
|
||
# spec file and its source | ||
spec_src=${name}.spec.in | ||
spec=${name}.spec | ||
|
||
# determine the pom version and the rpm version | ||
pom_version=$(grep "<version>" ${base_dir}/pom.xml | head -1 | sed -e 's/<version>//g' -e 's/<\/version>//g' -e "s/[ \t]*//g") | ||
rpm_version=$(grep '%global base_version' ${spec_src} | awk '{ print $3 }') | ||
|
||
# Python runtime dep | ||
python=python26 | ||
|
||
# Oracle | ||
oracle_path=/usr/lib64/oracle | ||
|
||
# Oracle jar name | ||
oracle_jar=ojdbc6.jar | ||
|
||
# Cleanup | ||
./clean.sh | ||
|
||
## Prepare spec file | ||
sed -e "s#@@POM_VERSION@@#${pom_version}#g" \ | ||
-e "s#@@PYTHON@@#${python}#g" \ | ||
-e "s#@@ORACLE_PATH@@#${oracle_path}#g" \ | ||
-e "s#@@ORACLE_JAR@@#${oracle_jar}#g" \ | ||
${spec_src} > ${spec} | ||
|
||
## setup RPM build dir structure | ||
mkdir -p ${rpmbuild_dir}/BUILD \ | ||
${rpmbuild_dir}/RPMS \ | ||
${rpmbuild_dir}/SOURCES \ | ||
${rpmbuild_dir}/SPECS \ | ||
${rpmbuild_dir}/SRPMS | ||
|
||
## Prepare sources | ||
## We cannot use tar --transform as the tar version in SL5 does not support it | ||
source_tmp_dir=$(mktemp -d /tmp/${name}-rpm.XXXXX) | ||
|
||
mkdir -p ${source_tmp_dir}/${name} | ||
cp -r ${base_dir} ${source_tmp_dir}/${name} | ||
pushd ${source_tmp_dir} | ||
tar cvzf ${rpmbuild_dir}/SOURCES/${name}.tar.gz --exclude=".git" --exclude="${name}/package/*" --exclude="${name}/package" --exclude="${name}/target" . | ||
popd | ||
|
||
rm -rf ${source_tmp_dir} | ||
|
||
rpm_build_command="rpmbuild --nodeps -v -ba ${spec} --define \'_topdir ${rpmbuild_dir}\'" | ||
|
||
if [ -n "${build_number}" ]; then | ||
rpmbuild --nodeps -v -ba ${spec} --define "_topdir ${rpmbuild_dir}" --define "build_number ${build_number}" | ||
else | ||
rpmbuild --nodeps -v -ba ${spec} --define "_topdir ${rpmbuild_dir}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
rm -rf rpmbuild | ||
rm -f *.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
## Turn off meaningless jar repackaging | ||
%define __jar_repack 0 | ||
|
||
%global base_version 3.3.0 | ||
%global base_release 1 | ||
|
||
%global pom_version @@POM_VERSION@@ | ||
%global python_version @@PYTHON@@ | ||
%global oracle_libs_path @@ORACLE_PATH@@ | ||
%global oracle_jar_name @@ORACLE_JAR@@ | ||
|
||
%if %{?build_number:1}%{!?build_number:0} | ||
%define package_version %{base_version}.dev.%{build_number} | ||
%define release_version 0 | ||
%else | ||
%define package_version %{base_version} | ||
%define release_version %{base_release} | ||
%endif | ||
|
||
Name: voms-admin-server | ||
Version: %{package_version} | ||
Release: %{release_version}%{?dist} | ||
Summary: The VOMS Administration service | ||
|
||
Group: Applications/Internet | ||
License: ASL 2.0 | ||
URL: https://twiki.cnaf.infn.it/twiki/bin/view/VOMS | ||
Source: %{name}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
|
||
BuildArch: noarch | ||
|
||
BuildRequires: apache-maven | ||
BuildRequires: jpackage-utils | ||
BuildRequires: java-1.6.0-openjdk-devel | ||
BuildRequires: oracle-instantclient-basic | ||
|
||
Requires: java-1.6.0-openjdk-devel | ||
Requires: python(abi) = 2.6 | ||
|
||
%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. | ||
|
||
The VOMS Admin service is a web application providing tools for administering | ||
the VOMS VO structure. It provides an intuitive web user interface for daily | ||
administration tasks. | ||
|
||
%prep | ||
%setup -n voms-admin-server | ||
|
||
%build | ||
mvn -U -PEMI,prod -DskipTests clean package | ||
|
||
%install | ||
rm -rf $RPM_BUILD_ROOT | ||
mkdir -p $RPM_BUILD_ROOT | ||
tar -C $RPM_BUILD_ROOT -xvzf voms-admin-server/target/%{name}.tar.gz | ||
|
||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/voms-admin | ||
|
||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/voms-admin | ||
|
||
# Stage oracle jar | ||
cp `find %{oracle_libs_path} -name %{oracle_jar_name}` $RPM_BUILD_ROOT/var/lib/voms-admin/lib | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%pre | ||
|
||
## Create VOMS user if needed | ||
getent group voms > /dev/null || groupadd -r voms | ||
getent passwd voms > /dev/null || useradd -r -g voms \ | ||
-d %{_sysconfdir}/voms -s /sbin/nologin -c "VOMS Server Account" voms | ||
|
||
if [ -d "/var/lib/voms-admin/lib" ]; then | ||
rm -rf /var/lib/voms-admin/lib/*.jar | ||
fi | ||
|
||
if [ -d "/usr/share/voms-admin/vo.d" ]; then | ||
rm -rf /usr/share/voms-admin/vo.d | ||
fi | ||
|
||
if [ -d "/usr/share/voms-admin/work" ]; then | ||
rm -rf /usr/share/voms-admin/work | ||
fi | ||
|
||
exit 0 | ||
|
||
%post | ||
/sbin/chkconfig --add voms-admin | ||
|
||
if [ $1 -gt 1 ]; then | ||
if [ -e /etc/voms-admin/voms-siblings.xml ]; then | ||
rm -f /etc/voms-admin/voms-siblings.xml | ||
fi | ||
chown -R voms /etc/voms-admin | ||
chown -R voms /var/tmp/voms-admin | ||
fi | ||
|
||
%preun | ||
if [ $1 = 0 ]; then | ||
/sbin/service voms-admin stop >/dev/null 2>&1 || : | ||
/sbin/chkconfig --del voms-admin | ||
fi | ||
exit 0 | ||
|
||
%postun | ||
if [ $1 -gt 1 ]; then | ||
/sbin/service voms-admin restart 2>&1 || : | ||
fi | ||
|
||
%files | ||
|
||
%defattr(-,root,root,-) | ||
|
||
%{_initrddir}/voms-admin | ||
|
||
%dir %{_sysconfdir}/voms-admin | ||
%config(noreplace) %{_sysconfdir}/sysconfig/voms-admin | ||
|
||
%config(noreplace) %{_sysconfdir}/voms-admin/voms-admin-server.logback | ||
%config(noreplace) %{_sysconfdir}/voms-admin/voms-admin-server.properties | ||
|
||
%{_sbindir}/* | ||
|
||
%{_javadir}/voms-admin.jar | ||
%{_javadir}/voms-container.jar | ||
%{_datadir}/webapps/voms-admin.war | ||
|
||
%{_datadir}/doc/voms-admin-server/* | ||
|
||
%dir %{_datadir}/voms-admin/info-providers | ||
%{_datadir}/voms-admin/info-providers/* | ||
|
||
%dir %{_datadir}/voms-admin/templates | ||
%{_datadir}/voms-admin/templates/* | ||
|
||
%dir %{_datadir}/voms-admin/wsdls | ||
%{_datadir}/voms-admin/wsdls/* | ||
|
||
/var/lib/voms-admin/lib/*.jar | ||
/var/lib/voms-admin/tools/* | ||
|
||
%dir %{_localstatedir}/lib/voms-admin/vo.d | ||
%attr(-,voms,voms) %dir %{_localstatedir}/lib/voms-admin/work | ||
%attr(-,voms,voms) %dir %{_localstatedir}/log/voms-admin | ||
|
||
%changelog | ||
* Fri Oct 24 2014 Andrea Ceccanti <andrea.ceccanti at cnaf.infn.it> - 3.3.0-1 | ||
- Bumped version to 3.3.0 and adapted build to multi-module structure. | ||
|
||
* Tue Jun 25 2013 Andrea Ceccanti <andrea.ceccanti at cnaf.infn.it> - 3.2.0-1 | ||
- Fixes for: | ||
- https://issues.infn.it/jira/browse/VOMS-266 | ||
- https://issues.infn.it/jira/browse/VOMS-260 | ||
- https://issues.infn.it/jira/browse/VOMS-257 | ||
|
||
* Tue Mar 19 2013 Andrea Ceccanti <andrea.ceccanti at cnaf.infn.it> - 3.1.0-1 | ||
- Fixes for the following bugs: | ||
- [VOMS-229] - VOMSES startup script fails in restarting VOMSES web app | ||
- [VOMS-230] - VOMS Admin service incorrectly parses truststore refresh period from configuration | ||
- [VOMS-231] - Standalone VOMS Admin service deployment is not suitable for deployments with large number of VOs (> 10) | ||
- New feature: | ||
- [VOMS-235] - Allow easier search of users with pending Sign AUP requests | ||
|
||
* Wed Jul 11 2012 Andrea Ceccanti <andrea.ceccanti at cnaf.infn.it> - 3.0.0-1 | ||
- VOMS admin now runs as a process in an embedded container | ||
|
||
* Fri Dec 16 2011 Andrea Ceccanti <andrea.ceccanti at cnaf.infn.it> - 2.7.0-1 | ||
- Self-managed packaging |
Oops, something went wrong.