diff options
author | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-10-24 01:49:45 +0000 |
---|---|---|
committer | mharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-10-24 01:49:45 +0000 |
commit | d00c6c2187bb7cfc8111b5e97a59011b40111b54 (patch) | |
tree | 8d3f105c62fbd4923c3aa3a51c49ad7d99f5d6da /pki/dogtag/ocsp-ui | |
parent | ec2fc6225c80f296472af430cfb54871ec303e93 (diff) | |
download | pki-d00c6c2187bb7cfc8111b5e97a59011b40111b54.tar.gz pki-d00c6c2187bb7cfc8111b5e97a59011b40111b54.tar.xz pki-d00c6c2187bb7cfc8111b5e97a59011b40111b54.zip |
Build changes required to integrate Dogtag into Fedora.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@805 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/dogtag/ocsp-ui')
-rw-r--r-- | pki/dogtag/ocsp-ui/build.xml | 12 | ||||
-rwxr-xr-x | pki/dogtag/ocsp-ui/build_dogtag | 44 | ||||
-rw-r--r-- | pki/dogtag/ocsp-ui/dogtag-pki-ocsp-ui.spec | 252 |
3 files changed, 80 insertions, 228 deletions
diff --git a/pki/dogtag/ocsp-ui/build.xml b/pki/dogtag/ocsp-ui/build.xml index 42a303182..babdbcae6 100644 --- a/pki/dogtag/ocsp-ui/build.xml +++ b/pki/dogtag/ocsp-ui/build.xml @@ -137,12 +137,12 @@ <echo message="${begin.binary.zip.log.message}"/> <zip destfile="${dist.base.binaries}/${dist.name}.zip"> <zipfileset dir="./shared" - filemode="755" + filemode="644" prefix="usr/share/${product.prefix}/${product}"> <include name="**"/> </zipfileset> <zipfileset dir="." - filemode="755" + filemode="644" prefix="usr/share/doc/${dist.name}"> <include name="LICENSE"/> </zipfileset> @@ -153,12 +153,12 @@ <tar longfile="gnu" destfile="${dist.base.binaries}/${dist.name}.tar"> <tarfileset dir="./shared" - mode="755" + mode="644" prefix="${dist.name}/usr/share/${product.prefix}/${product}"> <include name="**"/> </tarfileset> <tarfileset dir="." - mode="755" + mode="644" prefix="${dist.name}/usr/share/doc/${dist.name}"> <include name="LICENSE"/> </tarfileset> @@ -200,7 +200,7 @@ <echo message="${begin.source.zip.log.message}"/> <zip destfile="${dist.base.source}/${src.dist.name}.zip"> <zipfileset dir="." - filemode="755" + filemode="644" prefix="${src.dist.name}"> <include name="${specfile}"/> <include name="LICENSE"/> @@ -217,7 +217,7 @@ <tar longfile="gnu" destfile="${dist.base.source}/${src.dist.name}.tar"> <tarfileset dir="." - mode="755" + mode="644" prefix="${src.dist.name}"> <include name="${specfile}"/> <include name="LICENSE"/> diff --git a/pki/dogtag/ocsp-ui/build_dogtag b/pki/dogtag/ocsp-ui/build_dogtag index 1c91be0a9..cecfd76d6 100755 --- a/pki/dogtag/ocsp-ui/build_dogtag +++ b/pki/dogtag/ocsp-ui/build_dogtag @@ -33,6 +33,50 @@ export DOGTAG_COMPONENT DOGTAG_SPECFILE="dogtag-pki-ocsp-ui.spec" export DOGTAG_SPECFILE +# Set PKI 'ant' environment variables (originally obtained from specfile) +PKI_PRODUCT_UI_FLAVOR_PREFIX="dogtag" +export PKI_PRODUCT_UI_FLAVOR_PREFIX +PKI_PRODUCT_PREFIX="pki" +export PKI_PRODUCT_PREFIX +PKI_PRODUCT="ocsp-ui" +export PKI_PRODUCT +PKI_VERSION="1.3.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/ocsp-ui/dogtag-pki-ocsp-ui.spec b/pki/dogtag/ocsp-ui/dogtag-pki-ocsp-ui.spec index ebeb8bb82..5c4d417df 100644 --- a/pki/dogtag/ocsp-ui/dogtag-pki-ocsp-ui.spec +++ b/pki/dogtag/ocsp-ui/dogtag-pki-ocsp-ui.spec @@ -1,249 +1,57 @@ -# 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 - -############################################################################### -### D E F I N I T I O N S ### -############################################################################### - -## Entity Definitions -%define base_entity Dogtag -%define base_prefix pki -%define base_ui_prefix dogtag - -## Product Definitions -%define base_system Certificate System -%define base_product Online Certificate Status Protocol User Interface -%define base_component ocsp-ui -%define base_pki %{base_entity} %{base_system} - -## Package Header Definitions -%define base_name %{base_ui_prefix}-%{base_prefix}-%{base_component} -%define base_version 1.2.0 -%define base_release 1 -%define base_group System Environment/Base -%define base_vendor Red Hat, Inc. -%define base_license GPLv2 with exceptions -%define base_packager %{base_vendor} <http://bugzilla.redhat.com/bugzilla> -%define base_summary %{base_pki} - %{base_product} -%define base_url http://pki.fedoraproject.org/wiki/PKI_Documentation - -## Helper Definitions -%define pki_ca %{base_entity} Certificate Authority -%define pki_drm %{base_entity} Data Recovery Manager -%define pki_ds Fedora Directory Server -%define pki_ocsp %{base_entity} Online Certificate Status Protocol Manager -%define pki_ra %{base_entity} Registration Authority -%define pki_tks %{base_entity} Token Key Service -%define pki_tps %{base_entity} Token Processing System - -## Don't build the debug packages -%define debug_package %{nil} - - -##===================## -## Linux Definitions ## -##===================## -%ifos Linux -## A distribution model is required on certain Linux operating systems! -## -## check for a pre-defined distribution model -%define undefined_distro %(test "%{dist}" = "" && echo 1 || echo 0) -%if %{undefined_distro} -%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0) -%if %{is_fedora} -## define a default distribution model on Fedora Linux -%define dist_prefix .fc -%define dist_version %(echo `rpm -qf --qf='%{VERSION}' /etc/fedora-release` | tr -d [A-Za-z]) -%define dist %{dist_prefix}%{dist_version} -%else -%define is_redhat %(test -e /etc/redhat-release && echo 1 || echo 0) -%if %{is_redhat} -## define a default distribution model on Red Hat Linux -%define dist_prefix .el -%define dist_version %(echo `rpm -qf --qf='%{VERSION}' /etc/redhat-release` | tr -d [A-Za-z]) -%define dist %{dist_prefix}%{dist_version} -%endif -%endif -%endif -%endif - - - -############################################################################### -### P A C K A G E H E A D E R ### -############################################################################### - -Name: %{base_name} -Version: %{base_version} -Release: %{base_release}%{?dist} -Summary: %{base_summary} -Vendor: %{base_vendor} -URL: %{base_url} -License: %{base_license} -Packager: %{base_packager} -Group: %{base_group} - - -## Without AutoReqProv: no, rpmbuild finds all sorts of crazy -## dependencies that we don't care about, and refuses to install -AutoReqProv: no +Name: dogtag-pki-ocsp-ui +Version: 1.3.0 +Release: 1%{?dist} +Summary: Dogtag Certificate System - Online Certificate Status Protocol User Interface +URL: http://pki.fedoraproject.org/ +License: GPLv2 with exceptions +Group: System Environment/Base BuildArch: noarch -BuildRoot: %{_builddir}/%{base_name}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -## NOTE: This spec file may require a specific JDK, "gcc", and/or "gcc-c++" -## packages as well as the "rpm" and "rpm-build" packages. -## -## Technically, "ant" should not need to be in "BuildRequires" since -## it is the Java equivalent of "make" (and/or "Autotools"). -## -BuildRequires: ant >= 1.6.2 +BuildRequires: ant -## Without Requires something, rpmbuild will abort! -Requires: bash >= 3.0 -Provides: %{base_prefix}-%{base_component} -Obsoletes: %{base_prefix}-%{base_component} +Requires: bash +Provides: pki-ocsp-ui = %{version}-%{release} -## This package is non-relocatable! -#Prefix: - -Source0: %{base_name}-%{base_version}.tar.gz - -## This package currently contains no patches! -#Patch0: +Obsoletes: pki-ocsp-ui < %{version}-%{release} +Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz %description -%{base_pki} is an enterprise software system designed +Dogtag Certificate System is an enterprise software system designed to manage enterprise Public Key Infrastructure (PKI) deployments. -The %{base_entity} %{base_product} contains the graphical -user interface for the %{pki_ocsp}. - - - -############################################################################### -### P R E P A R A T I O N & S E T U P ### -############################################################################### +The Dogtag Online Certificate Status Protocol User Interface contains the +graphical user interface for the +Dogtag Online Certificate Status Protocol Manager. -## On Linux systems, prep and setup expect there to be a Source file -## in the /usr/src/redhat/SOURCES directory - it will be unpacked -## in the _builddir (not BuildRoot) %prep - %setup -q - -## This package currently contains no patches! -#%patch0 -# patches - - - -############################################################################### -### B U I L D P R O C E S S ### -############################################################################### - %build -ant -Dspecfile=%{base_name}.spec - - - -############################################################################### -### I N S T A L L A T I O N P R O C E S S ### -############################################################################### +ant \ + -Dproduct.ui.flavor.prefix="dogtag" \ + -Dproduct.prefix="pki" \ + -Dproduct="ocsp-ui" \ + -Dversion="%{version}" %install +rm -rf %{buildroot} cd dist/binary -unzip %{name}-%{version}.zip -d ${RPM_BUILD_ROOT} - - - -############################################################################### -### C L E A N U P P R O C E S S ### -############################################################################### +unzip %{name}-%{version}.zip -d %{buildroot} %clean -rm -rf ${RPM_BUILD_ROOT} - - - -############################################################################### -### P R E & P O S T I N S T A L L / U N I N S T A L L S C R I P T S ### -############################################################################### - -## This package currently contains no pre-installation process! -#%pre - - -## This package currently contains no post-installation process! -#%post - - -## This package currently contains no pre-uninstallation process! -#%preun - - -## This package currently contains no post-uninstallation process! -#%postun - - - -############################################################################### -### I N V E N T O R Y O F F I L E S A N D D I R E C T O R I E S ### -############################################################################### +rm -rf %{buildroot} %files -%attr(-,root,root) %{_datadir}/doc/%{base_name}-%{base_version}/* -%attr(-,root,root) %{_datadir}/%{base_prefix}/* - - - -############################################################################### -### C H A N G E L O G ### -############################################################################### +%defattr(-,root,root,-) +%doc LICENSE +%{_datadir}/pki/* %changelog -* Tue Jul 28 2009 Matthew Harmsen <mharmsen@redhat.com> 1.2.0-1 -- Version update to Dogtag 1.2.0. -* Fri Jun 19 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-3 -- Bugzilla Bug #506867 - Provide custom error page for HTTP STATUS 500 -* Mon Jun 15 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-2 -- Bugzilla Bug #502908 - Current page not found handling is a Cat 2 finding - with the Tomcat STIG -* Sat Apr 4 2009 Matthew Harmsen <mharmsen@redhat.com> 1.1.0-1 -- Version update to Dogtag 1.1.0. -* Tue Mar 24 2009 Matthew Harmsen <mharmsen@redhat.com> 1.0.0-5 -- Bugzilla Bug #488388 - copyright notices - remove from UI -- Bugzilla Bug #440543 - CA's web-services page needs improvements -* Fri Jan 30 2009 Ade Lee <alee@redhat.com> 1.0.0-4 -- Bugzilla Bug #460582 - add UTF-8 support -* Fri Nov 28 2008 Matthew Harmsen <mharmsen@redhat.com> 1.0.0-3 -- Bugzilla Bug #445402 - changed "linux"/"fedora" to "dogtag"; changed - "pki-svn.fedora.redhat.com" to "pki.fedoraproject.org" -* Sat Nov 22 2008 Matthew Harmsen <mharmsen@redhat.com> 1.0.0-2 -- Bugzilla Bug #472305 - "equality" tests in all spec files need to be fixed -- Bumped "java" and "java-devel" 1.4.2 and 1.5.0 dependencies to 1.6.0 -- Changed "java-sdk" to "java-devel" for consistency -* Tue Feb 19 2008 PKI Team <pki-devel@redhat.com> 1.0.0-1 -- Initial open source version based upon proprietary - Red Hat Certificate System (RHCS) 7.3. - +* Thu Oct 15 2009 Ade Lee <alee@redhat.com> 1.3.0-1 +- Bugzilla Bug #X - Packaging for Fedora Dogtag |