summaryrefslogtreecommitdiffstats
path: root/pki/dogtag/ra
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
commita4682ceae6774956461edd03b2485bbacea445f4 (patch)
tree94c475a125441da63101738220ce3972cf37db61 /pki/dogtag/ra
parent0c775428675d2cb1be9551f84e6b741ca813f77e (diff)
downloadpki-a4682ceae6774956461edd03b2485bbacea445f4.tar.gz
pki-a4682ceae6774956461edd03b2485bbacea445f4.tar.xz
pki-a4682ceae6774956461edd03b2485bbacea445f4.zip
Bugzilla Bug #688225 - (dogtagIPAv2.1) TRACKER: of the Dogtag fixes for freeIPA 2.1IPA_v2_RHEL_6_2_20111003
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/tags/IPA_v2_RHEL_6_2_20111003@2252 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/dogtag/ra')
-rwxr-xr-xpki/dogtag/ra/build_dogtag82
-rw-r--r--pki/dogtag/ra/pki-ra.spec120
2 files changed, 202 insertions, 0 deletions
diff --git a/pki/dogtag/ra/build_dogtag b/pki/dogtag/ra/build_dogtag
new file mode 100755
index 000000000..76e17ebff
--- /dev/null
+++ b/pki/dogtag/ra/build_dogtag
@@ -0,0 +1,82 @@
+#!/bin/bash
+# BEGIN COPYRIGHT BLOCK
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# (C) 2007 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+
+# Always switch into the base directory of this
+# shell script prior to executing it so that all
+# of its output is written to this directory
+cd `dirname $0`
+
+# Retrieve the directory name housing this component
+PWD=`pwd`
+
+# Set Dogtag component-specific environment variables
+DOGTAG_BUILD_SCRIPT=`basename $0`
+export DOGTAG_BUILD_SCRIPT
+DOGTAG_COMPONENT=`basename ${PWD}`
+export DOGTAG_COMPONENT
+DOGTAG_SPECFILE="pki-ra.spec"
+export DOGTAG_SPECFILE
+
+# Set PKI 'ant' environment variables (originally obtained from specfile)
+PKI_PRODUCT_UI_FLAVOR_PREFIX=""
+export PKI_PRODUCT_UI_FLAVOR_PREFIX
+PKI_PRODUCT_PREFIX="pki"
+export PKI_PRODUCT_PREFIX
+PKI_PRODUCT="ra"
+export PKI_PRODUCT
+PKI_VERSION="9.0.0"
+export PKI_VERSION
+
+# Set Dogtag helper variables
+DOGTAG_COMPONENT_NAME=${PKI_PRODUCT}
+export DOGTAG_COMPONENT_NAME
+DOGTAG_WGET_URL=http://cvs.fedora.redhat.com/viewvc
+export DOGTAG_WGET_URL
+
+# Obtain '${DOGTAG_SPECFILE}' as necessary
+if [ "$1" = "refresh" ]; then
+ if [ -f "${DOGTAG_SPECFILE}" ]; then
+ printf "Removing '${DOGTAG_SPECFILE}' . . . "
+ rm -rf ${DOGTAG_SPECFILE}
+ printf "done.\n"
+ fi
+ shift
+fi
+if [ ! -f "${DOGTAG_SPECFILE}" ]; then
+ # Check for Fedora Operating System
+ if [ ! -f /etc/fedora-release ]; then
+ printf "'${DOGTAG_COMPONENT_NAME}' ONLY builds on Fedora!\n"
+ exit 255
+ fi
+ # Obtain Fedora Operating System Version
+ FEDORA_VERSION="F-`cat /etc/fedora-release | awk '{print $3}'`"
+ export FEDORA_VERSION
+ # Retrieve '${DOGTAG_SPECFILE}' from Koji
+ printf "Fetching '${DOGTAG_SPECFILE}' for '${FEDORA_VERSION}' . . .\n"
+ wget -O ${DOGTAG_SPECFILE} ${DOGTAG_WGET_URL}/${FEDORA_VERSION}/${DOGTAG_COMPONENT_NAME}/${DOGTAG_SPECFILE}?view=co
+ if [ ! -s "${DOGTAG_SPECFILE}" ]; then
+ printf "Failed to fetch '${DOGTAG_SPECFILE}' for '${FEDORA_VERSION}'!\n"
+ rm -rf ${DOGTAG_SPECFILE}
+ exit 255
+ fi
+fi
+
+# Invoke the shared Dogtag PKI build script
+config-ext/build_dogtag_pki $@
+
diff --git a/pki/dogtag/ra/pki-ra.spec b/pki/dogtag/ra/pki-ra.spec
new file mode 100644
index 000000000..c2c8f89af
--- /dev/null
+++ b/pki/dogtag/ra/pki-ra.spec
@@ -0,0 +1,120 @@
+Name: pki-ra
+Version: 9.0.0
+Release: 2%{?dist}
+Summary: Dogtag Certificate System - Registration Authority
+URL: http://pki.fedoraproject.org/
+License: GPLv2
+Group: System Environment/Daemons
+
+BuildArch: noarch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: ant
+
+Requires: mod_nss >= 1.0.7
+Requires: mod_perl >= 1.99_16
+Requires: mod_revocator >= 1.0.3
+Requires: pki-native-tools
+Requires: pki-ra-ui
+Requires: pki-selinux
+Requires: pki-setup
+Requires: perl-DBD-SQLite
+Requires: /usr/sbin/sendmail
+Requires: sqlite
+Requires(post): chkconfig
+Requires(preun): chkconfig
+Requires(preun): initscripts
+Requires(postun): initscripts
+
+Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz
+
+%description
+Dogtag Certificate System is an enterprise software system designed
+to manage enterprise Public Key Infrastructure (PKI) deployments.
+
+The Dogtag Registration Authority is an optional PKI subsystem that
+acts as a front-end for authenticating and processing
+enrollment requests, PIN reset requests, and formatting requests.
+
+Dogtag Registration Authority communicates over SSL with the
+Dogtag Certificate Authority to fulfill the user's requests.
+
+%prep
+
+%setup -q
+
+cat << \EOF > %{name}-prov
+#!/bin/sh
+%{__perl_provides} $* |\
+sed -e '/perl(PKI.*)/d' -e '/perl(Template.*)/d'
+EOF
+
+%global __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov
+chmod +x %{__perl_provides}
+
+cat << \EOF > %{name}-req
+#!/bin/sh
+%{__perl_requires} $* |\
+sed -e '/perl(PKI.*)/d' -e '/perl(Template.*)/d'
+EOF
+
+%global __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
+chmod +x %{__perl_requires}
+
+%build
+ant \
+ -Dinit.d="rc.d/init.d" \
+ -Dproduct.ui.flavor.prefix="" \
+ -Dproduct.prefix="pki" \
+ -Dproduct="ra" \
+ -Dversion="%{version}"
+
+%install
+rm -rf %{buildroot}
+cd dist/binary
+unzip %{name}-%{version}.zip -d %{buildroot}
+cd %{buildroot}%{_datadir}/pki/ra/conf
+mv CS.cfg.in CS.cfg
+sed -i 's/^preop.product.version=.*$/preop.product.version=%{version}/' %{buildroot}%{_datadir}/pki/ra/conf/CS.cfg
+mkdir -p %{buildroot}%{_localstatedir}/lock/pki/ra
+mkdir -p %{buildroot}%{_localstatedir}/run/pki/ra
+
+# rename config.desktop.in --> config.desktop
+cd %{buildroot}%{_datadir}/pki/ra/setup
+mv config.desktop.in config.desktop
+
+%clean
+rm -rf %{buildroot}
+
+%post
+# This adds the proper /etc/rc*.d links for the script
+/sbin/chkconfig --add pki-rad || :
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/service pki-rad stop >/dev/null 2>&1
+ /sbin/chkconfig --del pki-rad || :
+fi
+
+%postun
+if [ "$1" -ge "1" ] ; then
+ /sbin/service pki-rad condrestart >/dev/null 2>&1 || :
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_initrddir}/*
+%{_datadir}/pki/
+%{_localstatedir}/lock/*
+%{_localstatedir}/run/*
+
+%changelog
+* Fri Feb 4 2011 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-2
+- Bugzilla Bug #606943 - Convert RA to use ldap utilities from
+ OpenLDAP instead of the Mozldap
+
+* Fri Nov 19 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1
+- Updated Dogtag 1.3.x --> Dogtag 2.0.0 --> Dogtag 9.0.0.
+