diff --git a/.gitignore b/.gitignore index f5e8082..de64401 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ xca-0.8.1.tar.gz +/xca-0.9.0.tar.gz +/README.update +/xca-0.9.1.tar.gz +/xca-0.9.2.tar.gz +/xca-0.9.3.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index e5461e3..0000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -MAKEFILE_COMMON = $(HOME)/.fedora/common.mk --include $(MAKEFILE_COMMON) diff --git a/README.update b/README.update deleted file mode 100644 index cdf62b4..0000000 --- a/README.update +++ /dev/null @@ -1,7 +0,0 @@ -xca-0.6 uses a different database format. To convert the existing -database, execute: - -1. Install 'db_dump' from the db4-utils package: - | yum install db4-utils - -2. Read /usr/share/xca/xca-2.html for further instructions diff --git a/lastver b/lastver deleted file mode 100644 index 6f4eebd..0000000 --- a/lastver +++ /dev/null @@ -1 +0,0 @@ -0.8.1 diff --git a/sources b/sources index 1f0025a..997fb6f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -ca87fd1af19ea2d90ac5aca1c296dd21 xca-0.8.1.tar.gz +5e08cf8a93f023b1b3836c203bd0a694 xca-0.9.3.tar.gz +113ba37a89fe2de69338fcfe3b773a03 README.update diff --git a/verinfo b/verinfo deleted file mode 100644 index 2d6d9c7..0000000 --- a/verinfo +++ /dev/null @@ -1,2 +0,0 @@ -http://sourceforge.net/project/showfiles.php?group_id=62274 -xca-(.*?)\.tar\. diff --git a/xca-0.6.4-includes.patch b/xca-0.6.4-includes.patch deleted file mode 100644 index 34f86c3..0000000 --- a/xca-0.6.4-includes.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: xca-0.7.0/lib/db.h -=================================================================== ---- xca-0.7.0.orig/lib/db.h -+++ xca-0.7.0/lib/db.h -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #define XCA_MAGIC 0xcadb1969 - #define NAMELEN 80 diff --git a/xca-0.6.4-openssl10.patch b/xca-0.6.4-openssl10.patch deleted file mode 100644 index ee2ee34..0000000 --- a/xca-0.6.4-openssl10.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: xca-0.7.0/lib/pki_x509req.cpp -=================================================================== ---- xca-0.7.0.orig/lib/pki_x509req.cpp -+++ xca-0.7.0/lib/pki_x509req.cpp -@@ -350,7 +350,11 @@ void pki_x509req::set_spki(NETSCAPE_SPKI - void pki_x509req::load_spkac(const QString filename) - { - STACK_OF(CONF_VALUE) *sk=NULL; -+#if OPENSSL_VERSION_NUMBER >= 0x10000000L -+ LHASH_OF(CONF_VALUE) *parms=NULL; -+#else - LHASH *parms=NULL; -+#endif - CONF_VALUE *cv=NULL; - x509name subject; - char *type,*buf; diff --git a/xca-0.7.0-locale.patch b/xca-0.7.0-locale.patch deleted file mode 100644 index b701cc9..0000000 --- a/xca-0.7.0-locale.patch +++ /dev/null @@ -1,26 +0,0 @@ -2007-03-17 Enrico Scholz - * lib/main.c: use correct locale for the xca.qm file - * lib/main.c: [SECURITY] do not load qt.qm file from current - directory - -Index: xca-0.7.0/lib/main.cpp -=================================================================== ---- xca-0.7.0.orig/lib/main.cpp -+++ xca-0.7.0/lib/main.cpp -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include "widgets/MainWindow.h" - #include "lib/func.h" -@@ -39,7 +40,7 @@ int main( int argc, char *argv[] ) - #else - locale = QLocale::system().name(); - #endif -- qtTr.load( QString( "qt_" ) + locale, "." ); -+ qtTr.load( QString( "qt_" ) + locale, XCA_DEFAULT_TRANSLATE); - xcaTr.load( QString( "xca_" ) + locale, getPrefix() ); - - a.installTranslator( &qtTr ); diff --git a/xca-0.8.0-noec.patch b/xca-0.8.0-noec.patch deleted file mode 100644 index 1e58fa2..0000000 --- a/xca-0.8.0-noec.patch +++ /dev/null @@ -1,259 +0,0 @@ -Index: xca-0.8.0/lib/pki_evp.cpp -=================================================================== ---- xca-0.8.0.orig/lib/pki_evp.cpp -+++ xca-0.8.0/lib/pki_evp.cpp -@@ -25,9 +25,11 @@ QString pki_evp::passHash = QString(); - - QPixmap *pki_evp::icon[2]= { NULL, NULL }; - -+#ifndef DISABLE_EC - EC_builtin_curve *pki_evp::curves = NULL; - size_t pki_evp::num_curves = 0; - unsigned char *pki_evp::curve_flags = NULL; -+#endif - - void pki_evp::erasePasswd() - { -@@ -107,7 +109,9 @@ void pki_evp::generate(int bits, int typ - { - RSA *rsakey; - DSA *dsakey; -+#ifndef DISABLE_EC - EC_KEY *eckey; -+#endif - - progress->setMinimum(0); - progress->setMaximum(100); -@@ -127,6 +131,7 @@ void pki_evp::generate(int bits, int typ - if (dsakey) - EVP_PKEY_set1_DSA(key, dsakey); - break; -+#ifndef DISABLE_EC - case EVP_PKEY_EC: - EC_GROUP *group = EC_GROUP_new_by_curve_name(curve_nid); - if (!group) -@@ -147,6 +152,7 @@ void pki_evp::generate(int bits, int typ - EC_KEY_free(eckey); - EC_GROUP_free(group); - break; -+#endif - } - openssl_error(); - encryptKey(); -@@ -190,8 +196,10 @@ static bool EVP_PKEY_isPrivKey(EVP_PKEY - return key->pkey.rsa->d ? true: false; - case EVP_PKEY_DSA: - return key->pkey.dsa->priv_key ? true: false; -+#ifndef DISABLE_EC - case EVP_PKEY_EC: - return EC_KEY_get0_private_key(key->pkey.ec) ? true: false; -+#endif - } - return false; - } -@@ -236,6 +244,7 @@ void pki_evp::fromPEM_BIO(BIO *bio, QStr - openssl_error(name); - } - -+#ifndef DISABLE_EC - static void search_ec_oid(EC_KEY *ec) - { - const EC_GROUP *ec_group = EC_KEY_get0_group(ec); -@@ -260,6 +269,7 @@ static void search_ec_oid(EC_KEY *ec) - } - } - } -+#endif - - void pki_evp::fload(const QString fname) - { -@@ -301,8 +311,10 @@ void pki_evp::fload(const QString fname) - } - fclose(fp); - if (pkey){ -+#ifndef DISABLE_EC - if (pkey->type == EVP_PKEY_EC) - search_ec_oid(pkey->pkey.ec); -+#endif - if (key) - EVP_PKEY_free(key); - key = pkey; -@@ -680,7 +692,9 @@ const EVP_MD *pki_evp::getDefaultMD() - switch (key->type) { - case EVP_PKEY_RSA: md = EVP_sha1(); break; - case EVP_PKEY_DSA: md = EVP_dss1(); break; -+#ifndef DISABLE_EC - case EVP_PKEY_EC: md = EVP_ecdsa(); break; -+#endif - default: md = NULL; break; - } - return md; -Index: xca-0.8.0/lib/pki_scard.cpp -=================================================================== ---- xca-0.8.0.orig/lib/pki_scard.cpp -+++ xca-0.8.0/lib/pki_scard.cpp -@@ -178,6 +178,7 @@ EVP_PKEY *pki_scard::load_pubkey(pkcs11 - EVP_PKEY_set1_DSA(pkey, dsa); - break; - } -+#ifndef DISABLE_EC - case CKK_EC: { - EC_KEY *ec = EC_KEY_new(); - -@@ -202,6 +203,7 @@ EVP_PKEY *pki_scard::load_pubkey(pkcs11 - EVP_PKEY_set1_EC_KEY(pkey, ec); - break; - } -+#endif - default: - throw errorEx(QString("Unsupported CKA_KEY_TYPE: %1\n").arg(keytype)); - } -@@ -304,8 +306,10 @@ const EVP_MD *pki_scard::getDefaultMD() - return EVP_sha1(); - if (mech_list.contains(CKM_DSA_SHA1)) - return EVP_dss1(); -+#ifndef DISABLE_EC - if (mech_list.contains(CKM_ECDSA_SHA1)) - return EVP_ecdsa(); -+#endif - if (mech_list.contains(CKM_SHA512_RSA_PKCS)) - return EVP_sha512(); - if (mech_list.contains(CKM_SHA384_RSA_PKCS)) -Index: xca-0.8.0/widgets/KeyDetail.cpp -=================================================================== ---- xca-0.8.0.orig/widgets/KeyDetail.cpp -+++ xca-0.8.0/widgets/KeyDetail.cpp -@@ -25,6 +25,7 @@ KeyDetail::KeyDetail(QWidget *parent) - keyDesc->setReadOnly(true); - } - -+#ifndef DISABLE_EC - static QString CurveComment(int nid) - { - for (size_t i=0; isetText(key->subprime()); - keyModulus->setText(key->pubkey()); - break; -+#ifndef DISABLE_EC - case EVP_PKEY_EC: - nid = key->ecParamNid(); - tlModulus->setText(tr("Public key")); -@@ -84,6 +87,7 @@ void KeyDetail::setKey(pki_key *key) - keyPubEx->setToolTip(CurveComment(nid)); - keyModulus->setText(key->ecPubKey()); - break; -+#endif - default: - tlHeader->setText(tr("UNKNOWN Key")); - } -Index: xca-0.8.0/widgets/NewKey.cpp -=================================================================== ---- xca-0.8.0.orig/widgets/NewKey.cpp -+++ xca-0.8.0/widgets/NewKey.cpp -@@ -23,7 +23,9 @@ struct typelist { - static const struct typelist typeList[] = { - { "RSA", EVP_PKEY_RSA }, - { "DSA", EVP_PKEY_DSA }, -+#ifndef DISABLE_EC - { "EC", EVP_PKEY_EC }, -+#endif - }; - - NewKey::NewKey(QWidget *parent, QString name) -@@ -48,6 +50,7 @@ NewKey::NewKey(QWidget *parent, QString - keyType->addItem(QString(typeList[i].name)); - } - -+#ifndef DISABLE_EC - for (i = 0; iaddItems(curve_x962); - curveBox->addItems(curve_other); -+#endif -+ - keyLength->setCurrentIndex(0); - keyDesc->setFocus(); - } -Index: xca-0.8.0/widgets/hashBox.cpp -=================================================================== ---- xca-0.8.0.orig/widgets/hashBox.cpp -+++ xca-0.8.0/widgets/hashBox.cpp -@@ -42,8 +42,10 @@ const EVP_MD *hashBox::currentHash() - switch(key_type) { - case EVP_PKEY_DSA: - return EVP_dss1(); -+#ifndef DISABLE_EC - case EVP_PKEY_EC: - return EVP_ecdsa(); -+#endif - default: - QString hash = currentText(); - for (unsigned i=0; itype != EVP_PKEY_EC) -@@ -160,6 +161,7 @@ QString pki_key::ecPubKey() - } - return pub; - } -+#endif - - bool pki_key::compare(pki_base *ref) - { -Index: xca-0.8.0/widgets/MainWindow.cpp -=================================================================== ---- xca-0.8.0.orig/widgets/MainWindow.cpp -+++ xca-0.8.0/widgets/MainWindow.cpp -@@ -97,6 +97,7 @@ static const int other_curve_nids[] = { - - static void init_curves() - { -+#ifndef DISABLE_EC - pki_evp::num_curves = EC_get_builtin_curves(NULL, 0); - pki_evp::curves = (EC_builtin_curve*)OPENSSL_malloc( - (int)(sizeof(EC_builtin_curve) *pki_evp::num_curves)); -@@ -125,6 +126,7 @@ static void init_curves() - } - } - } -+#endif - } - - void MainWindow::load_engine() diff --git a/xca-0.9.3-french.patch b/xca-0.9.3-french.patch new file mode 100644 index 0000000..bf879ed --- /dev/null +++ b/xca-0.9.3-french.patch @@ -0,0 +1,12 @@ +diff -Naur xca-0.9.3.orig/lang/fr.po xca-0.9.3.new/lang/fr.po +--- xca-0.9.3.orig/lang/fr.po 2012-05-12 11:37:14.000000000 +0200 ++++ xca-0.9.3.new/lang/fr.po 2012-05-14 14:33:27.386075980 +0200 +@@ -1883,7 +1883,7 @@ + + #: PwDialog#2 + msgid "" +-"The password is parsed as 2-digit hex code. It must have an equal number of " ++"The password is parsed as 2-digit hex code. It must have an even number of " + "digits (0-9 and a-f)" + msgstr "" + "Le mot de passe doit ĂȘtre exprimĂ© sous forme d'une suite de chiffres " diff --git a/xca.spec b/xca.spec index cd9279f..ff281e1 100644 --- a/xca.spec +++ b/xca.spec @@ -1,140 +1,168 @@ %{!?release_func:%global release_func() %1%{?dist}} -%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \ -%nil} Summary: Graphical X.509 certificate management tool Name: xca -Version: 0.8.1 -Release: %release_func 1401 +Version: 0.9.3 +Release: %release_func 1 License: BSD Group: Applications/Productivity URL: http://www.hohnstaedt.de/xca.html -Source0: http://download.sourceforge.net/sourceforge/xca/%name-%version.tar.gz +Source0: http://downloads.sourceforge.net/sourceforge/xca/%{name}-%{version}.tar.gz Source1: README.update -Source4: xca.xml -Patch0: xca-0.7.0-locale.patch -Patch2: xca-0.6.4-includes.patch -Patch3: xca-0.6.4-openssl10.patch -Patch4: xca-0.8.0-noec.patch -BuildRoot: %_tmppath/%name-%version-%release-buildroot +Patch1: xca-0.9.3-french.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: qt4-devel openssl-devel -BuildRequires: db4-devel BuildRequires: xdg-utils BuildRequires: ImageMagick BuildRequires: linuxdoc-tools BuildRequires: libtool-ltdl-devel +BuildRequires: translate-toolkit Requires: hicolor-icon-theme Requires(posttrans): shared-mime-info Requires(postun): shared-mime-info %description -The Program uses a Berkeley db for storage and supports RSA keys. -Certificate signing requests (PKCS#10) and Certificates (X509v3), the -signing of requests, and the creation of selfsigned certificates is -supported. Both can use templates for simplicity. The PKI structures -can be imported and exported in several formats like PKCS#7, PKCS#12, -PEM, DER, PKCS#8. + X Certificate and Key management is a graphic interface for managing +asymmetric keys like RSA or DSA, certificates and revocation lists. It is +intended as a small CA for creation and signing certificates. It uses the +OpenSSL library for the cryptographic operations. + Certificate signing requests (PKCS#10), certificates (X509v3), the signing +of requests, the creation of self-signed certificates, certificate revocation +lists and SmartCards are supported. For an easy company-wide use, customizable +templates can be used for certificate and request generation. The PKI structures +can be imported and exported in several formats like PKCS#7, PKCS#12, PEM, +DER, PKCS#8. All cryptographic data are stored in a byte order agnostic file +format, portable across operating systems. %prep %setup -q -%apply -n0 -p1 -%apply -n2 -p1 -%apply -n3 -p1 -%apply -n4 -p1 + +%patch1 -p 1 -b .french mkdir -p _tmp_root/usr -ln -s /usr/%_lib _tmp_root/usr/lib -ln -s /%_lib _tmp_root/lib -ln -s %_includedir/Qt _tmp_root/include +ln -s "/usr/%{_lib}" _tmp_root/usr/lib +ln -s "/%{_lib}" _tmp_root/lib +ln -s "%{_includedir}/Qt" _tmp_root/include -install -p -m644 %SOURCE1 '.' - -sed -i -e 's!xca\.xpm!fedora-xca!g;s!^Exec=.*!\0 %f!' misc/xca.desktop +install -p -m 644 "%{SOURCE1}" ./ %build -#test -n "$QTDIR" || . %_sysconfdir/profile.d/qt.sh -export QTDIR=%_libdir/qt4 -CC='%__cxx' LD='%__ld' CFLAGS="$RPM_OPT_FLAGS -DDISABLE_EC -DXCA_DEFAULT_TRANSLATE=\\\"%_datadir/qt4/translations\\\"" \ -STRIP=: prefix=%_prefix LIBS="-Wl,-as-needed `pkg-config --libs QtGui`" \ -./configure `pwd`/_tmp_root{,/usr} +#test -n "${QTDIR}" || . "%{_sysconfdir}/profile.d/qt.sh" +export QTDIR="%{_libdir}/qt4" +CC='%{__cxx}' LD='%{__ld}' CFLAGS="${RPM_OPT_FLAGS} \ + -DXCA_DEFAULT_QT_TRANSLATE=\"\\\"%{_datadir}/qt4/translations\\\"\"" \ + STRIP=: prefix="%{_prefix}" \ + LIBS="-Wl,-as-needed `pkg-config --libs QtGui`" \ + ./configure "`pwd`/"_tmp_root{,/usr} make %{?_smp_mflags} convert img/xca.ico xca.png +touch -r img/xca.ico xca.png convert img/xdb.ico xdb.png +touch -r img/xdb.ico xdb.png + +iconv -f iso8859-1 -t utf8 AUTHORS > AUTHORS.utf8 +touch -r AUTHORS AUTHORS.utf8 +mv AUTHORS.utf8 AUTHORS %install -rm -rf "$RPM_BUILD_ROOT" +rm -rf "${RPM_BUILD_ROOT}" -make destdir="$RPM_BUILD_ROOT" mandir=share/man install -make destdir="$RPM_BUILD_ROOT" mandir=share/man install -C misc TOPDIR=.. +make destdir="${RPM_BUILD_ROOT}" mandir=share/man install +make destdir="${RPM_BUILD_ROOT}" mandir=share/man install.misc # HACK: check whether workarounds below are still necessary -test ! -e $RPM_BUILD_ROOT%_datadir/xca/crl.png +if test ! -e "${RPM_BUILD_ROOT}%{_datadir}/xca/crl.png" +then install -d -m 755 \ + "${RPM_BUILD_ROOT}%{_datadir}/"{applications,mime/packages,icons/hicolor} + install -p -m 644 img/*.png "${RPM_BUILD_ROOT}%{_datadir}/xca" +fi -install -d -m755 $RPM_BUILD_ROOT%_datadir/{applications,mime/packages,icons/hicolor} -install -p -m644 img/*.png $RPM_BUILD_ROOT%_datadir/xca -install -p -m644 %SOURCE4 $RPM_BUILD_ROOT%_datadir/mime/packages/ +install -p -m 644 misc/xca.xml "${RPM_BUILD_ROOT}%{_datadir}/mime/packages/" -export XDG_DATA_DIRS=$RPM_BUILD_ROOT%_datadir +export XDG_DATA_DIRS="${RPM_BUILD_ROOT}%{_datadir}" export XDG_UTILS_INSTALL_MODE=system -xdg-icon-resource install --noupdate --context mimetypes --size 32 xdb.png application-x-xca-database -xdg-icon-resource install --noupdate --size 32 xca.png fedora-xca +xdg-icon-resource install --noupdate --context mimetypes \ + --size 32 xdb.png application-x-xca-database +xdg-icon-resource install --noupdate --size 32 xca.png fedora-xca -desktop-file-install --vendor fedora --mode 0644 \ - --dir $RPM_BUILD_ROOT%_datadir/applications \ - --delete-original \ - --add-mime-type application/x-xca-database \ - --remove-category QT \ - $RPM_BUILD_ROOT%_datadir/applications/xca.desktop +desktop-file-install --vendor fedora --mode 0644 \ + --dir "${RPM_BUILD_ROOT}%{_datadir}/applications" \ + --delete-original \ + --add-mime-type application/x-xca-database \ + --remove-category QT \ + "${RPM_BUILD_ROOT}%{_datadir}/applications/xca.desktop" %clean -rm -rf "$RPM_BUILD_ROOT" +rm -rf "${RPM_BUILD_ROOT}" %post -touch --no-create %_datadir/icons/hicolor || : +touch --no-create "%{_datadir}/icons/hicolor" || : %preun -touch --no-create %_datadir/icons/hicolor || : +touch --no-create "%{_datadir}/icons/hicolor" || : %posttrans -gtk-update-icon-cache %_datadir/icons/hicolor &>/dev/null || : -update-mime-database %_datadir/mime &>/dev/null || : -update-desktop-database &>/dev/null || : +gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : +update-mime-database "%{_datadir}/mime" &> /dev/null || : +update-desktop-database &> /dev/null || : %postun -update-desktop-database &>/dev/null || : -update-mime-database %_datadir/mime &>/dev/null || : -gtk-update-icon-cache %_datadir/icons/hicolor &>/dev/null || : +update-desktop-database &> /dev/null || : +update-mime-database "%{_datadir}/mime" &> /dev/null || : +gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : %files -%defattr(-,root,root,-) +%defattr(-, root, root, -) %doc AUTHORS COPYRIGHT README.update -%_bindir/* -%attr(0644,root,root) %_mandir/*/* +%{_bindir}/* %dir %{_datadir}/xca -%_datadir/pixmaps/*.xpm -%_datadir/xca/*.png -%_datadir/xca/*.txt -%_datadir/xca/*.html -%_datadir/xca/*.xca -%_datadir/icons/*/*/*/*.png -%_datadir/mime/packages/%name.* -%lang(de) %_datadir/xca/xca_de.qm -%lang(es) %_datadir/xca/xca_es.qm - -%_datadir/applications/* +%{_datadir}/xca/*.png +%{_datadir}/xca/*.txt +%{_datadir}/xca/*.html +%{_datadir}/xca/*.xca +%lang(de) %{_datadir}/xca/xca_de.qm +%lang(es) %{_datadir}/xca/xca_es.qm +%lang(fr) %{_datadir}/xca/xca_fr.qm +%lang(ru) %{_datadir}/xca/xca_ru.qm +%lang(tr) %{_datadir}/xca/xca_tr.qm +%{_datadir}/pixmaps/*.xpm +%{_datadir}/icons/*/*/*/*.png +%{_datadir}/mime/packages/%{name}.* +%{_datadir}/applications/* +%attr(0644, root, root) %{_mandir}/*/* %changelog +* Mon May 14 2012 Patrick Monnerat 0.9.3-1 +- New upstream release. + +* Mon May 7 2012 Patrick Monnerat 0.9.2-1 +- New upstream release. +- Patch "french" to update french translation. + +* Tue Nov 8 2011 Patrick Monnerat 0.9.1-1 +- New upstream release: all previous patches included in new code. + +* Mon Feb 28 2011 Patrick Monnerat 0.9.0-2 +- Fix Exec parameter in desktop file. + +* Mon Feb 28 2011 Patrick Monnerat 0.9.0-1 +- New upstream release. +- Suppress "includes" patch (went upstream). +- Suppress "openssl10" patch (new release is openssl 10 compatible). +- Patches "locale" and "noec" port to new release. +- French localization added. + * Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-1401 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/xca.xml b/xca.xml deleted file mode 100644 index 393ba73..0000000 --- a/xca.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - XCA Database - - -