import esc-1.1.2-7.el8

This commit is contained in:
CentOS Sources 2019-07-29 22:52:48 -04:00 committed by Stepan Oksanichenko
commit 2688114a83
9 changed files with 4581 additions and 0 deletions

2
.esc.metadata Normal file
View File

@ -0,0 +1,2 @@
2750a5e0bc3221503f44a33c9f59aef5a6901203 SOURCES/esc-1.1.2.tar.bz2
115da701c784ea3fc89d2cb1bb0539011d246a1a SOURCES/esc.png

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/esc-1.1.2.tar.bz2
SOURCES/esc.png

64
SOURCES/esc Executable file
View File

@ -0,0 +1,64 @@
#!/bin/sh
#
# 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
function processArgs {
for arg in $1
do
if [ $arg == "--version" ]
then
echo ""
echo "Smart Card Manager: Version: $VERSION ."
echo ""
exit 0
fi
if [ $arg == "--help" ]
then
echo ""
echo "Smart Card Manager: GUI tool to manage smart cards."
echo "Run by selecting from the system menu or by typing , esc at the terminal."
echo ""
exit 0
fi
done
}
processArgs $*
ESC_PATH=$LIBDIR/esc-1.1.2
ESC_BIN=esc.js
ESC_EXEC=gjs
export OPENSC_CONF=$ESC_PATH/opensc.esc.conf
export GI_TYPELIB_PATH=$ESC_PATH/lib/girepository-1.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ESC_PATH/lib
cd $ESC_PATH
$ESC_EXEC --include-path $ESC_PATH ./$ESC_BIN &
exit 0

View File

@ -0,0 +1,33 @@
diff -up ./esc/src/lib/coolkey/Makefile.am.fix1 ./esc/src/lib/coolkey/Makefile.am
--- ./esc/src/lib/coolkey/Makefile.am.fix1 2018-10-08 14:04:44.963523599 -0700
+++ ./esc/src/lib/coolkey/Makefile.am 2018-10-08 14:06:18.605022660 -0700
@@ -54,6 +54,7 @@ lib_LTLIBRARIES += libCoolkey-1.0.la
libCoolkey_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
libCoolkey_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../nss-http-client
libCoolkey_1_0_la_LIBADD = $(COOLKEY_LIBS)
+libCoolkey_1_0_la_LDFLAGS = -Wl,-z,now
libCoolkey_1_0_la_SOURCES = $(source_c) $(source_cpp)
coolkeyincludedir = $(includedir)/src/lib/coolkey
diff -up ./esc/src/lib/coolkey-mgr/Makefile.am.fix1 ./esc/src/lib/coolkey-mgr/Makefile.am
--- ./esc/src/lib/coolkey-mgr/Makefile.am.fix1 2018-10-08 14:04:30.132602938 -0700
+++ ./esc/src/lib/coolkey-mgr/Makefile.am 2018-10-08 14:05:38.265238463 -0700
@@ -59,6 +59,7 @@ source_cpp = \
lib_LTLIBRARIES += libcoolkeymgr-1.0.la
libcoolkeymgr_1_0_la_LIBADD = $(COOLKEY_MGR_LIBS) $(ESC_LIBS) $(OTHER_LIBS)
+libcoolkeymgr_1_0_la_LDFLAGS = -Wl,-z,now
libcoolkeymgr_1_0_la_SOURCES = $(source_c) $(source_cpp) $(source_h)
coolkeymgrincludedir = $(includedir)/coolkey-mgr
diff -up ./esc/src/lib/nss-http-client/Makefile.am.fix1 ./esc/src/lib/nss-http-client/Makefile.am
--- ./esc/src/lib/nss-http-client/Makefile.am.fix1 2018-10-08 14:04:57.302457592 -0700
+++ ./esc/src/lib/nss-http-client/Makefile.am 2018-10-08 14:06:44.701883050 -0700
@@ -52,6 +52,7 @@ lib_LTLIBRARIES += libNssHttpClient-1.0.
#libNssHttpClient_1_0_la_CFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -DLINUX -I ../coolkey
libNssHttpClient_1_0_la_CPPFLAGS = @PCSC_CFLAGS@ @NSPR_CFLAGS@ @NSS_CFLAGS@ -I ../coolkey @DEFS@
libNssHttpClient_1_0_la_LIBADD = $(COOLKEY_LIBS)
+libNssHttpClient_1_0_la_LDFLAGS = -Wl,-z,now
libNssHttpClient_1_0_la_SOURCES = $(source_c) $(source_cpp) $(source_h)
coolkeyincludedir = $(includedir)/src/lib/coolkey

View File

@ -0,0 +1,103 @@
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix2 ./esc/src/lib/coolkey/CoolKey.cpp
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix2 2018-10-11 18:34:34.622987227 -0700
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2018-10-11 18:36:11.918476971 -0700
@@ -492,13 +492,11 @@ HRESULT CoolKeyGetCUIDDirectly(char *aBu
}
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
goto done;
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
goto done;
}
@@ -559,13 +557,11 @@ HRESULT CoolKeyGetATRDirectly(char *aBuf
}
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
goto done;
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
goto done;
}
@@ -629,13 +625,11 @@ HRESULT CoolKeyGetLifeCycleDirectly(CKYB
}
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
goto done;
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
goto done;
}
@@ -691,13 +685,11 @@ HRESULT CoolKeyGetCPLCDataDirectly(CKYAp
}
cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
goto done;
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
goto done;
}
@@ -752,19 +744,16 @@ static void PR_CALLBACK BlinkTimer(void
const char *readerName = NULL;
CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
goto done;
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
goto done;
}
readerName = GetReaderNameForKeyID(&params->mKey);
- assert(readerName);
if (!readerName) {
goto done;
}
@@ -1336,7 +1325,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
- assert(cardCtxt);
if (!cardCtxt) {
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't create Card Context !.\n",GetTStamp(tBuff,56));
result = E_FAIL;
@@ -1344,7 +1332,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
}
conn = CKYCardConnection_Create(cardCtxt);
- assert(conn);
if (!conn) {
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't create Card Connection!\n",GetTStamp(tBuff,56));
result = E_FAIL;
@@ -1352,7 +1339,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
}
readerName = GetReaderNameForKeyID(aKey);
- assert(readerName);
if (!readerName) {
CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't get reader name!\n",GetTStamp(tBuff,56));
result = E_FAIL;

View File

@ -0,0 +1,300 @@
diff -up ./esc/configure.ac.fix3 ./esc/configure.ac
--- ./esc/configure.ac.fix3 2018-07-30 14:51:37.000000000 -0700
+++ ./esc/configure.ac 2018-10-12 14:06:48.349544811 -0700
@@ -56,8 +56,6 @@ AM_PROG_AR
AM_SILENT_RULES([yes])
LT_INIT
-SCARD_LIB_NAME="libpcsclite.so.1"
-
# Versioning
ESC_MAJOR_VERSION=esc_major_version
ESC_MINOR_VERSION=esc_minor_version
@@ -75,6 +73,7 @@ GOBJECT_INTROSPECTION_CHECK(1.56.1)
# Output
AC_DEFINE([DLL_SUFFIX], ["so"], [Description])
AC_DEFINE([LINUX], [1], [Description])
+AC_DEFINE([SCARD_LIB_NAME],["libpcsclite.so.1"], [Description])
AC_SUBST(ESC_CFLAGS)
AC_SUBST(ESC_LIBS)
AC_CONFIG_FILES([Makefile src/app/Makefile src/lib/coolkey/Makefile src/lib/nss-http-client/Makefile src/lib/coolkey-mgr/Makefile])
diff -up ./esc/src/app/esc.js.fix3 ./esc/src/app/esc.js
--- ./esc/src/app/esc.js.fix3 2018-10-12 17:59:36.790939337 -0700
+++ ./esc/src/app/esc.js 2018-10-12 19:26:51.847470201 -0700
@@ -44,13 +44,16 @@ const CoolKeyNotify = new Lang.Class({
this._unique_name = "Unknown";
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(CoolKeyNotifyIface, this);
this._dbusImpl.export(Gio.DBus.session, '/com/jmagne/CoolKeyNotify');
- this._dbusId = Gio.DBus.session.own_name( 'com.rm5248', Gio.BusNameOwnerFlags.NONE, this._nameAcquired.bind(this), this._nameLost);
+ this._dbusId = Gio.DBus.session.own_name( 'com.rm5248', Gio.BusNameOwnerFlags.NONE, this._nameAcquired.bind(this), this._nameLost.bind(this));
},
_nameAcquired: function( name ) {
this._unique_name = name.unique_name;
this._client._createCoolKeyMgr(this._unique_name);
},
_nameLost: function( name ) {
+ if(this._client._window) {
+ this._client._window.destroy();
+ }
},
notifyCoolKeyEvent: function(aKeyType, aKeyID, aKeyState, aData, strData) {
@@ -76,6 +79,7 @@ class ESC {
this._window.present();
}
_onStartup() {
+ this.mgr = null;
this._buildUI();
this.notify = new CoolKeyNotify(this);
}
@@ -95,8 +99,10 @@ class ESC {
this.notify._dbusImpl.unexport();
this.notify = null;
}
- this.mgr.cleanup();
- this.mgr = null;
+ if(this.mgr) {
+ this.mgr.cleanup();
+ this.mgr = null;
+ }
this._window.destroy();
}
@@ -212,9 +218,7 @@ class ESC {
if (res == false) {
this._configFile.set_string("ESC","name","Smart Card Utility");
- print("attmpeting to create: " + config_name);
res = this._configFile.save_to_file(config_name);
- print("res: " + res);
}
}
diff -up ./esc/src/lib/coolkey/cky_card.c.fix3 ./esc/src/lib/coolkey/cky_card.c
--- ./esc/src/lib/coolkey/cky_card.c.fix3 2018-05-03 14:03:07.000000000 -0700
+++ ./esc/src/lib/coolkey/cky_card.c 2018-10-12 14:06:48.350544806 -0700
@@ -139,21 +139,15 @@ typedef struct _SCard {
goto fail; \
}
-#ifdef WIN32
-#define SCARD_LIB_NAME "winscard.dll"
-#else
-#ifdef MAC
-#define SCARD_LIB_NAME "PCSC.Framework/PCSC"
-#else
#ifdef LINUX
-#define SCARD_LIB_NAME "libpcsclite.so"
+#ifndef SCARD_LIB_NAME
+#define SCARD_LIB_NAME "libpcsclite.so.1"
#else
#ifndef SCARD_LIB_NAME
#error "define wincard library for this platform"
#endif
#endif
#endif
-#endif
static SCard *
ckySCard_Init(void)
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix3 ./esc/src/lib/coolkey/CoolKey.cpp
diff -up ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix3 ./esc/src/lib/coolkey-mgr/coolkey-api.cpp
--- ./esc/src/lib/coolkey-mgr/coolkey-api.cpp.fix3 2018-10-12 15:12:59.937348875 -0700
+++ ./esc/src/lib/coolkey-mgr/coolkey-api.cpp 2018-10-12 18:28:34.674060797 -0700
@@ -71,6 +71,12 @@ tokenInfo *coolkey_get_token_info(int ke
if(tInfo == NULL) {
exit(1);
}
+
+ tInfo ->atr = NULL;
+ tInfo->issuerInfo = NULL;
+ tInfo->issuer = NULL;
+ tInfo->issuedTo = NULL;
+ tInfo->status = 0;
coolkey->GetCoolKeyATR(keyType, keyID, &tInfo->atr);
diff -up ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp.fix3 ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp
--- ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp.fix3 2018-10-12 14:22:05.938864628 -0700
+++ ./esc/src/lib/coolkey-mgr/rhCoolKey.cpp 2018-10-12 19:15:26.447926406 -0700
@@ -1053,17 +1053,19 @@ HRESULT rhCoolKey::GetCoolKeyCertInfo(PR
HRESULT rhCoolKey::GetCoolKeyATR(PRUint32 aKeyType, const char *aKeyID, char **_retval)
{
char tBuff[56];
+ if(aKeyID == NULL || _retval == NULL) {
+ return E_FAIL;
+ }
*_retval = NULL;
AutoCoolKey key(aKeyType, aKeyID);
- char atr[128];
- HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr));
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr));
- if(res == S_OK)
- {
- char *temp = (char *) PL_strdup(atr);
- *_retval = temp;
+ char atr[128] = {};
+ HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr));
+
+ if(res == S_OK) {
+ *_retval = (char *) PL_strdup(atr);
}
- return NS_OK;
+ return res;
}
/* string GetCoolKeyTokenName (in unsigned long aKeyType, in string aKeyID); */
@@ -1097,24 +1099,25 @@ HRESULT rhCoolKey::GetCoolKeyTokenName(P
HRESULT rhCoolKey::GetCoolKeyIssuerInfo(PRUint32 aKeyType, const char *aKeyID, char **_retval)
{
char tBuff[56];
+
+ if(aKeyID == NULL || _retval == NULL) {
+ return E_FAIL;
+ }
*_retval = NULL;
AutoCoolKey key(aKeyType, aKeyID);
- char issuerInfo[256];
+ char issuerInfo[256] = {};
HRESULT res = CoolKeyGetIssuerInfo(&key, (char *)&issuerInfo,256);
::CoolKeyLogMsg( 1, "%s Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) issuerInfo);
- if(res == S_OK)
- {
- char *temp = (char *) PL_strdup(issuerInfo);
- *_retval = temp;
-
+ if(res == S_OK) {
+ *_retval = (char *) PL_strdup(issuerInfo);
}
- return NS_OK;
+ return res;
}
/* void rhGetCoolKeyPolicy (in unsigned long aKeyType, in string aKeyID, out string policy); */
@@ -1153,28 +1156,22 @@ HRESULT rhCoolKey::GetCoolKeyPolicy(PRUi
HRESULT rhCoolKey::GetCoolKeyUID(PRUint32 aKeyType, const char *aKeyID, char **uid)
{
char tBuff[56];
- if (!aKeyID) {
- return NS_ERROR_FAILURE;
+ if (aKeyID == NULL || uid == NULL) {
+ return E_FAIL;
}
AutoCoolKey key(aKeyType, ( char *)aKeyID);
- char buff[512];
+ char buff[512] = {};
int bufLength = 512;
- buff[0] = 0;
- CoolKeyGetUID(&key, (char *) buff, bufLength);
-
- if(!buff[0])
- {
- return NS_OK;
- }
+ HRESULT res = CoolKeyGetUID(&key, (char *) buff, bufLength);
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetUID %s \n",GetTStamp(tBuff,56),(char *) buff));
- char *temp = (char *) PL_strdup(buff);
-
- *uid = temp;
+ if(res == S_OK) {
+ char *uid = (char *) PL_strdup(buff);
+ }
return NS_OK;
@@ -1185,32 +1182,25 @@ HRESULT rhCoolKey::GetCoolKeyUID(PRUint3
HRESULT rhCoolKey::GetCoolKeyIssuedTo(PRUint32 aKeyType, const char *aKeyID, char **issuedTo)
{
char tBuff[56];
- if (!aKeyID) {
- return NS_ERROR_FAILURE;
+ if (aKeyID == NULL || issuedTo == NULL) {
+ return E_FAIL;
}
+ *issuedTo = NULL;
AutoCoolKey key(aKeyType, ( char *)aKeyID);
- // const char *keyName = CoolKeyGetTokenName(&key);
-
- char buff[512];
+ char buff[512] = {};
int bufLength = 512;
- buff[0] = 0;
- CoolKeyGetIssuedTo(&key, (char *) buff, bufLength);
-
- if(!buff[0])
- {
- return NS_OK;
- }
+ HRESULT res = CoolKeyGetIssuedTo(&key, (char *) buff, bufLength);
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",GetTStamp(tBuff,56),(char *) buff));
- char *temp = (char *) PL_strdup(buff);
-
- *issuedTo = temp;
+ if(res == S_OK) {
+ *issuedTo = (char *) PL_strdup(buff);
+ }
- return NS_OK;
+ return res;
}
@@ -1218,32 +1208,24 @@ HRESULT rhCoolKey::GetCoolKeyIssuedTo(PR
HRESULT rhCoolKey::GetCoolKeyIssuer(PRUint32 aKeyType, const char *aKeyID, char **issuer)
{
char tBuff[56];
- if (!aKeyID) {
- return NS_ERROR_FAILURE;
+ if (!aKeyID || !issuer) {
+ return E_FAIL;
}
AutoCoolKey key(aKeyType, ( char *)aKeyID);
- // const char *keyName = CoolKeyGetTokenName(&key);
-
- char buff[512];
+ char buff[512] = {};
int bufLength = 512;
- buff[0] = 0;
- CoolKeyGetIssuer(&key, (char *) buff, bufLength);
-
- if(!buff[0])
- {
- return NS_OK;
- }
+ HRESULT res = CoolKeyGetIssuer(&key, (char *) buff, bufLength);
PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuer %s \n",GetTStamp(tBuff,56),(char *) buff));
- char *temp = (char *) PL_strdup(buff);
-
- *issuer = temp;
+ if(res == S_OK) {
+ *issuer = (char *) PL_strdup(buff);
+ }
- return NS_OK;
+ return res;
}
diff -up ./esc/src/lib/coolkey-mgr/rhCoolKey.h.fix3 ./esc/src/lib/coolkey-mgr/rhCoolKey.h

3722
SOURCES/esc-1.1.2-fix4.patch Normal file

File diff suppressed because it is too large Load Diff

8
SOURCES/esc.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Smart Card Manager
Comment=Enterprise Security Client Smart Card Manager
Categories=System;Application;SystemSetup;X-Red-Hat-Base;
Exec=esc
Icon=esc.png

347
SPECS/esc.spec Normal file
View File

@ -0,0 +1,347 @@
Name: esc
Version: 1.1.2
Release: 7%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL+
URL: http://directory.fedora.redhat.com/wiki/CoolKey
Group: Applications/Internet
#Fix to harden linker flags.
Patch1: esc-1.1.2-fix1.patch
Patch2: esc-1.1.2-fix2.patch
Patch3: esc-1.1.2-fix3.patch
Patch4: esc-1.1.2-fix4.patch
#BuildRequires: doxygen fontconfig-devel
BuildRequires: glib2-devel atk-devel
BuildRequires: pkgconfig
BuildRequires: nspr-devel nss-devel nss-static
#BuildRequires: libX11-devel libXt-devel
BuildRequires: pcsc-lite-devel
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: dbus-glib-devel
BuildRequires: glib2-devel
BuildRequires: opensc
BuildRequires: gobject-introspection-devel
BuildRequires: gtk3-devel
BuildRequires: gjs-devel
Requires: pcsc-lite nss nspr
Requires: dbus
Requires: opensc
Requires: gjs
Requires: gobject-introspection
Requires: gtk3
Requires: glib2
AutoReqProv: 0
%define debug_build 0
%define escname %{name}-%{version}
%define escdir %{_libdir}/%{escname}
%define escbindir %{_bindir}
%define esc_chromepath chrome/content/esc
%define appdir applications
%define icondir %{_datadir}/icons/hicolor/48x48/apps
%define esc_vendor esc
%define autostartdir %{_sysconfdir}/xdg/autostart
%define pixmapdir %{_datadir}/pixmaps
%define docdir %{_defaultdocdir}/%{name}
Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2
Source1: http://pki.fedoraproject.org/pki/sources/%name/esc
Source2: http://pki.fedoraproject.org/pki/sources/%name/esc.desktop
Source3: http://pki.fedoraproject.org/pki/sources/%name/esc.png
%description
Enterprise Security Client allows the user to enroll and manage their
cryptographic smartcards.
%prep
%setup -q -c -n %{escname}
#patch esc
%patch1 -p1 -b .fix1
%patch2 -p1 -b .fix2
%patch3 -p1 -b .fix3
%patch4 -p1 -b .fix4
%build
echo $RPM_BUILD_DIR
echo "build section" $PWD
cd esc
./autogen.sh
make
%install
echo "install section" $PWD
cd esc
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/%{escbindir}
mkdir -p $RPM_BUILD_ROOT/%{icondir}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
mkdir -p $RPM_BUILD_ROOT/%{pixmapdir}
mkdir -p $RPM_BUILD_ROOT/%{docdir}
echo "dir: " $RPM_BUILD_ROOT/%{escbindir}/%{name}
sed -e 's;\$LIBDIR;'%{_libdir}';g' -e 's;\$VERSION;'%{version}';g' %{SOURCE1} > $RPM_BUILD_ROOT/%{escbindir}/%{name}
chmod 755 $RPM_BUILD_ROOT/%{escbindir}/%{name}
mkdir -p $RPM_BUILD_ROOT/%{escdir}
mkdir -p $RPM_BUILD_ROOT/%{escdir}/lib
cp $RPM_BUILD_ROOT/usr/local/bin/* $RPM_BUILD_ROOT/%{escdir}
cp -rf $RPM_BUILD_ROOT/usr/local/lib $RPM_BUILD_ROOT/%{escdir}
rm $RPM_BUILD_ROOT/%{escdir}/lib/*.a
rm $RPM_BUILD_ROOT/%{escdir}/lib/*.la
rm -rf $RPM_BUILD_ROOT/usr/local
cp %{SOURCE3} $RPM_BUILD_ROOT/%{icondir}
ln -s $RPMBUILD_ROOT%{icondir}/esc.png $RPM_BUILD_ROOT/%{pixmapdir}/esc.png
cp %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
cd %{_builddir}
cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
%files
%{!?_licensedir:%global license %%doc}
%license %{docdir}/LICENSE
%{escbindir}/esc
%{escdir}/lib
%{escdir}/esc.js
%{escdir}/esc.properties
%{escdir}/operationDialog.js
%{escdir}/phoneHome.js
%{escdir}/pinDialog.js
%{escdir}/opensc.esc.conf
%{icondir}/esc.png
%{pixmapdir}/esc.png
%{_datadir}/%{appdir}/esc.desktop
%changelog
* Fri Feb 01 2019 Jack Magne <jmagne@redhat.com> - 1.1.2-7
- #Related: Bug 1596915 - Remove XULRunner from ESC. Minor launch
- script fix.
* Thu Jan 10 2019 Jack Magne <jmagne@redhat.com> - 1.1.2-6
- #Resolve: Bug 1638011 - esc docdir should not be versioned in rhel8.
- #Resolve: Bug 1596915 - Remove XULRunner from ESC.
* Fri Oct 12 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-4
- #Resolve: Bug 1633238 - ESC crashes when smartcard is detected.
* Mon Oct 08 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-4
- #Resolve: Bug 1630560 - Review annocheck distro flag failures in esc.
* Wed Aug 22 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-3
- Remove remaining arch exclusions.
* Wed Aug 01 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-1
- Remove uneeded Requires and no longer put in autostart directory.
* Mon Jul 30 2018 Jack Magne <jmagne@redhat.com> - 1.1.2-1
- Build bare bones esc, without xulrunner, using gjs / gobject
- introspection.
* Thu Jun 07 2018 Jack Magne <jmagne@redhat.com> - 1.1.1-5
- Rebuild.
* Mon Apr 23 2018 Jack Magne <jmagne@redhat.com> - 1.1.1-4
- Remove coolkey dependencies, replace with opensc.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.1-2
- Remove obsolete scriptlets
* Mon Aug 07 2017 - 1.1.1-1
- Rebuilt using internally built xulrunner, due to the xulrunner package going away.
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun May 8 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-30
- Secondary arch fixes
- Use %%license
* Mon Feb 08 2016 Jack Magne <jmagne@redhat.com> 1.1.0-29
- Apease latest xullrunner api changes.
* Thu Apr 09 2015 Jack Magne <jmagne@redhat.com> 1.1.0-27
- More xulrunner adjustments.
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Apr 23 2014 Jack Magne <jmagne@redhat.com>=1.1.0-24
- Fix minor http client error.
* Thu Apr 17 2014 Jack Maghe <jmagne@redhat.com>=1.1.0-23
- Appease more xulrunner changes.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Jul 7 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.1.0-22
- Make buildable with kernels > 3.5.
- %%changelog syntax and bogus date fixes.
- Bump xulrunner version to 22.0.
* Mon Jun 17 2013 Jack Magne <jmagne@redhat.com>- 1.1.0-21
- Appease latest compiler errors and build to xulrunner 21.0.
* Wed Nov 28 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-20
- Gecko no longer supports UniversalXPConnect, remove it.
* Wed Nov 21 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-19
- Pick up latest fixes.
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 22 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-17
- Related #688361 - Get ESC to run on Gecko 2.0, again.
* Thu May 10 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-16
- Related #688361 - Get ESC to run on Gecko 2.0.
* Mon Feb 20 2012 Jack Magne <jmagne@redhat.com>- 1.1.0-15
- Related #688361 - Get ESC to run on Gecko 2.0.
* Tue Nov 29 2011 Jack Magne <jmagne@redhat.com>- 1.1.0-14
- Related #688361 - Get ESC to run on Gecko 2.0.
* Thu Apr 15 2010 Jack Magne <jmagne@redhat.com>- 1.1.0-11
- Adjust for new linking rules.
* Tue Sep 15 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-10
- Pick up latest improvements.
* Mon Jun 22 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-9
- Related: #496410, also IPV6 support.
* Fri Jun 19 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-8
- Related: #496410, SSL Conn fix.
* Mon Jun 8 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-7
- Releated: #496410.
* Thu Apr 23 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-6
- Related: #496410. Appease rpmdiff.
* Wed Apr 22 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-5
- Related: #496410, addresses 494981, better error message.
* Wed Apr 22 2009 Jack Magne <jmagne@redhat.com>- 1.1.0-4
- Move to latest rebased code. Related #496410.
* Thu Dec 04 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-39
- Resolves #469202 - Cert Viewer issue
* Tue Nov 11 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-38
- Resolves #471923 - ESC Connection issue.
* Thu Oct 16 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-37
- Resolves #467126 - Blank authentication dialog problem.
* Fri Sep 26 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-36
- Related #200475 - Require the xulrunner package, Resolves #248493
* Thu Sep 18 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-35
- Related 200475, make rpmdiff tests happy.
* Tue Sep 16 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-34
- Resolves #200475 #253081 #437238
* Thu Jan 10 2008 Jack Magne <jmagne@redhat.com>- 1.0.0-33
- Resolves #25324a8 #253268
* Thu Jul 12 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-32
- Resolves #248071 - ESC RPM unistall failure if daemon not running.
* Fri Jun 22 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-31
- Related #208038 - Top things to put in diagnostics log
* Wed Jun 20 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-30
- Related #204021
* Fri Jun 8 2007 Jack Magne <jmagne@redhat.com>- 1.0-0-29
- Related #212010
* Fri Jun 8 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-28
- Resolves #212010
* Tue Jun 5 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-27
- Resolves #203466 Better error message strings.
* Mon May 21 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-26
- Related: #206783 Fix the launcher script to work with new logging.
* Fri May 11 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-25
- Resolves: #206783.
* Mon Apr 23 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-24
- More Desktop appearance fixes.
- Related: #208749
* Mon Apr 23 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-23
- Desktop appearance fixes.
- Related: #208749
* Thu Apr 19 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-22
- Second drop of 5.1 fixes.
- Resolves: #203934, #203935, #204959, #206780, #206792, #207721
- Resolves: #207816, #206791
- Related: #208749
* Wed Apr 18 2007 Jack Magne <jmagne@redhat.com>- 1.0.0-21
- First 5.1 fixes.
- Resolves: #203757, #203806, #204661, #205856, #206788, #206791
- Resolves: #208037, #208333, #210589, #210590, #213912, #226913
- Resolves: #204021, #205498, #224436
* Tue Nov 28 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-20
- fix for bug to commit config changes immediately. Bug #210988
* Wed Nov 15 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-19
-fix for escd double free problem. Bug #209882
* Tue Oct 24 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-18
-rebuilt on RHEL-5 branch
* Wed Oct 4 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-17
- Diagnostics display fixes, Mac and Window fixes.
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 1.0.0-16
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
* Fri Sep 22 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-15
- Fix to the build version
* Fri Sep 22 2006 Jack Magne <jmagne@redhat.com>= 1.0.0-14
- Fix to compile error in daemon
* Fri Sep 22 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-13
- Fix to include the new esc daemon.
* Sat Sep 16 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-12
- Fix for Password Reset and minor UI revision.
* Fri Sep 15 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-11
- Further UI enhancement bug fixes
* Thu Sep 7 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-10
- Further strings revisions.
* Wed Aug 30 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-9
- Revision of the strings used in ESC.
* Wed Aug 30 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-8
- Fixes to get libnotify working properly on FC6 systems.
* Tue Aug 22 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-7
- Fix for bug #203211, use of system NSS and NSPR for
- Xulrunner ,addressing the problem running on 64 bit.
- Overwriting 5 and 6 due to important bug #203211.
* Fri Aug 18 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-6
- Correct problem with Patch #6
* Fri Aug 18 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-5
- Build ESC's xulrunner component using system nss and nspr
- Build process creates run script based on {_libdir} variable,
accounting for differences on 64 bit machines.
- UI enhancements
* Tue Aug 1 2006 Matthias Clasen <mclasen@redhat.com> - 1.0.0-4
- Don't auto-generate requires either
* Mon Jul 31 2006 Matthias Clasen <mclasen@redhat.com> - 1.0.0-3
- Don't provide mozilla libraries
* Fri Jul 28 2006 Ray Strode <rstrode@redhat.com> - 1.0.0-2
- remove bogus gtk+ requires (and some others that will
be automatic)
* Tue Jun 13 2006 Jack Magne <jmagne@redhat.com> - 1.0.0-1
- Initial revision for fedora