Author: jmagne
Update of /cvs/dirsec/esc/rpm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29257
Modified Files:
esc esc.spec
Added Files:
build.sh
Log Message:
Add build script. r. mharmsen.
--- NEW FILE build.sh ---
#!/bin/bash
# Command line arg values
# 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., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
echo "Building ESC...."
RPMBASE=RPMS
RPMPATH=
RPM_OS_TAG=fc8
RPMEXT=i386
RPMDIR=$RPMBASE/$RPMEXT
arch64="x86_64"
thearch=$(uname -m)
#Temporarily installed RPMS
RPM_PCSC_LITE_LIBS=
RPM_PCSC_LITE_DEVEL=
RPM_COOLKEY_DEVEL=
RPM_COOLKEY=
RPM_CCID=
RPM_NSS_DEVEL=
RPM_NSPR_DEVEL=
#URLs for SRPMs if drawn from the net
FEDORA_SRPMS=http://download.fedora.redhat.com/pub/fedora/linux/developme...
ESC_SRPM=esc-1.0.1-5.fc8.src.rpm
ESC_URL=$FEDORA_SRPMS/$ESC_SRPM
#####################################################################
################ Cleanup the temporary installed devel packages #####
#####################################################################
function cleanup {
echo "Cleaning up ..."
}
function getSRPM {
if [ -z $1 ];
then
echo "No input SRPM..."
return 0;
else
echo "Obtaining " $1
wget -nc --directory-prefix=SRPMS $1
if [ $? != 0 ];
then
"Echo problem obtaining SRPM $1."
exit 1
fi
fi
}
function getRPM {
if [ -z $1 ];
then
echo "No input RPM..."
return 0;
else
echo "Obtaining " $1
wget -nc --directory-prefix=RPMS/$RPMEXT $1
if [ $? != 0 ];
then
"Echo problem obtaining RPM $1."
exit 1
fi
fi
}
function getSRPMS {
getSRPM $ESC_URL
}
function initializeBUILD {
mkdir -p BUILD
if [ $? != 0 ];
then
echo "Problem setting up build...."
exit 1
fi
mkdir -p RPMS
if [ $? != 0 ];
then
echo "Problem setting up build...."
exit 1
fi
mkdir -p SRPMS
if [ $? != 0 ];
then
echo "Problem setting up build...."
exit 1
fi
mkdir -p SPECS
if [ $? != 0 ];
then
echo "Problem setting up build...."
exit 1
fi
mkdir -p SOURCES
if [ $? != 0 ];
then
echo "Problem setting up build...."
exit 1
fi
}
#####################################################################
################ Main build logic ############################# #####
#####################################################################
initializeBUILD
getSRPMS
#####################################################################
################ Build ESC ##########################################
#####################################################################
echo "Building ESC...."
echo "Obtain latest ESC SRPM..."
echo "Installing ESC SRPM....."
rpm -Uvh --define="_topdir ${PWD}" SRPMS/$ESC_SRPM
if [ $? != 0 ];
then
echo "Problem installing ESC SRPM...."
cleanup
exit 1
fi
rpmbuild -ba --define="_topdir ${PWD}" SPECS/esc.spec
if [ $? != 0 ];
then
echo "Problem building final ESC RPM..."
fi
cleanup
exit 0
Index: esc
===================================================================
RCS file: /cvs/dirsec/esc/rpm/esc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- esc 5 Mar 2007 23:42:48 -0000 1.3
+++ esc 2 Aug 2007 18:16:38 -0000 1.4
@@ -17,6 +17,16 @@
# All rights reserved.
# END COPYRIGHT BLOCK
+
+
+
+DO_SECMODE="false"
+SECURITY_URL=
+DO_FORCEMODE="false"
+DO_SHOW_VERSION="false"
+ESC_ARGS=
+
+
ESC_PROFILE_BASE=~/.redhat/esc
ESC_LOG_FILE=esc.log
@@ -31,10 +41,12 @@
LAST_PROG_PID=0
SIGUSR1=10
-FORCE_START_ESC=$1
+FORCE_START_ESC=
XPTI_DAT=xpti.dat
COMPREG_DAT=compreg.dat
+LOCK_FILE=lock
+PARENT_LOCK_FILE=.parentlock
function isProgRunning {
@@ -51,51 +63,127 @@
function removeFile {
- if [ -w $1 ]
- then
- rm -f $1
- fi
+ rm -f $1
+}
+
+function cleanupProfile {
+
+ removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT
+ removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT
+ removeFile $ESC_PROFILE_BASE/*default/$LOCK_FILE
+ removeFile $ESC_PROFILE_BASE/*default/$PARENT_LOCK_FILE
+
}
+function processArgs {
+
+ for arg in $1
+ do
+
+ #echo "theArg: $arg"
+ if [ $arg == "forceStartESC" ]
+ then
+ #echo "Do force mode!"
+ FORCE_START_ESC="true"
+ fi
+
+ if [ $arg == "keyInserted" ]
+ then
+ FORCE_START_ESC="true"
+ fi
+
+ if [ $arg == "-version" ]
+ then
+ #echo "Do show version!"
+ DO_SHOW_VERSION="true"
+ fi
+ if [ $DO_SECMODE == "true" ]
+ then
+ #echo "Sec Mode Url $arg"
+ SECURITY_URL=$arg
+ fi
+ if [ $arg == "-secmode" ]
+ then
+ DO_SECMODE="true"
+ #echo "Do security mode!"
+ fi
+ done
-export
NSPR_LOG_MODULES=tray:2,coolKeyLib:2,coolKey:2,coolKeyNSS:2,coolKeySmart:2,coolKeyHandler:2,escDLog:5
+ if [ $DO_SECMODE == "true" ]
+ then
+ #echo "Launch ESC in security mode!"
+ ARGS="--secmode $SECURITY_URL"
+ fi
+}
+processArgs $*
if [ ! -d $ESC_PROFILE_BASE ]
then
-mkdir -p $ESC_PROFILE_BASE
+ mkdir -p $ESC_PROFILE_BASE
fi
-export NSPR_LOG_FILE=$ESC_PROFILE_BASE/$ESC_LOG_FILE
cd $ESC_PATH
-isProgRunning $ESC_BIN
+#First check if we just want the version
-if [ $LAST_PROG_PID -gt 0 ]
-then
-./$ESC_EXEC
-exit 0
+if [ $DO_SHOW_VERSION == "true" ]
+ then
+ #echo "try to run the version command!"
+ ESC_ARGS="-version"
+ ./$ESC_EXEC $ESC_ARGS
+ exit 0
fi
-if [ $FORCE_START_ESC ]
+# Start up the daemon if it is not running
+
+isProgRunning $ESCD_BIN
+
+if [ $LAST_PROG_PID -gt 0 ]
then
-./$ESC_EXEC
-exit 0
+ false
+ #echo "escd already running."
+else
+ #echo "escd not running start."
+ cleanupProfile
+ ./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\"
--on_Signal=\"/usr/bin/esc\"
+ exit 0
fi
+# Now check to see if we wer signaled from the daemon
+if [ $FORCE_START_ESC ]
+then
+ #echo "force start esc."
-isProgRunning $ESCD_BIN
+ #Check to see if esc is already running
+ isProgRunning $ESC_BIN
+ if [ $LAST_PROG_PID -gt 0 ]
+ then
+ #echo "attempting a force start but already running ... exit."
+ exit 0
+ fi
+ #echo "force start esc not running start esc..."
+ ./$ESC_EXEC
+ exit 0
+fi
-if [ $LAST_PROG_PID -gt 0 ]
+isProgRunning $ESC_BIN
+
+if [ $LAST_PROG_PID -gt 0 ]
then
-kill -$SIGUSR1 $LAST_PROG_PID
+ #echo "esc already running."
+ ./$ESC_EXEC
+ exit 0
else
-removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT
-removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT
-./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\"
--on_Signal=\"/usr/bin/esc\"
-
+ #echo "esc not already running start up and bring up window."
+ ./$ESC_EXEC &
+ sleep 4
+
+ #echo "done sleeping bring up esc window."
+ ./$ESC_EXEC
+ exit 0
fi
exit 0
Index: esc.spec
===================================================================
RCS file: /cvs/dirsec/esc/rpm/esc.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- esc.spec 5 Mar 2007 23:43:03 -0000 1.3
+++ esc.spec 2 Aug 2007 18:16:38 -0000 1.4
@@ -1,25 +1,25 @@
-# BEGIN COPYRIGHT BLOCK
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation version
-# 2.1 of the License.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# END COPYRIGHT BLOCK
+ # BEGIN COPYRIGHT BLOCK
+ # Copyright (C) 2005 Red Hat, Inc.
+ # All rights reserved.
+ #
+ # This library is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU Lesser General Public
+ # License as published by the Free Software Foundation version
+ # 2.1 of the License.
+ #
+ # This library 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
+ # Lesser General Public License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public
+ # License along with this library; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ # END COPYRIGHT BLOCK
Name: esc
Version: 1.0.1
-Release: 1%{?dist}
+Release: 5%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL
URL:
http://directory.fedora.redhat.com/wiki/CoolKey
@@ -29,6 +29,10 @@
Patch1: firefox-1.5-with-system-nss.patch
Patch2: firefox-1.1-nss-system-nspr.patch
+Patch3: esc-1.0.1-admin-row-update.patch
+Patch4: esc-1.0.1-ui-fixes-1.patch
+Patch5: esc-1.0.1-log-fixes.patch
+Patch6: esc-1.0.1-log-fixes-1.patch
BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1
BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel
@@ -61,12 +65,14 @@
%define pixmapdir %{_datadir}/pixmaps
%define docdir %{_defaultdocdir}/%{escname}
%define escappdir src/app/xpcom
+%define escxuldir src/app/xul/esc
Source0: %{escname}.tar.bz2
Source1: esc
Source2: esc.desktop
Source3: xulrunner-1.8.0.4-source.tar.bz2
+Source4: esc.png
%description
@@ -77,6 +83,12 @@
%setup -q -c -n %{escname}
+#Perform esc patching
+
+%patch3 -p1 -b .fix3
+%patch4 -p1 -b .fix4
+%patch5 -p1 -b .fix5
+%patch6 -p1 -b .fix6
#Unpack xulrunner where esc expects it to be.
@@ -101,6 +113,8 @@
cd ../..
+cp %{SOURCE4} %{escxuldir}/%{esc_chromepath}
+
make BUILD_OPT=1 HAVE_LIB_NOTIFY=1 ESC_VERSION=%{version}-%{release}
%install
@@ -172,6 +186,11 @@
%{_datadir}/%{appdir}/esc.desktop
%doc %{docdir}/LICENSE
+%preun
+
+killall --exact -q escd
+exit 0
+
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
@@ -185,7 +204,14 @@
fi
%changelog
-* Mon Mar 05 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.0-1
+* Tue Jul 17 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.1-5
+- Further fixes to the diagnostics logging.
+* Wed Jun 20 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.1-4
+- Fixes to the diagnostics log files and esc error messages.
+* Thu Apr 26 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.1-3
+- Many UI usability fixes.
+* Tue Apr 03 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.1-2
+* Mon Mar 05 2007 Jack Magne <jmagne(a)redhat.com>- 1.0.1-1
- Stability fixes
* Fri Oct 27 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-19
- More mac and win fixes.