From ceb9fa76fb8eefe5b4f49bfa5ab7f7617d5b0da2 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 22 Apr 2014 15:20:35 +0200 Subject: [PATCH 1/4] * Tue Apr 22 2014 Patrick Monnerat - 0.9.3-5 - Rebuild for elliptic curves inclusion. https://bugzilla.redhat.com/show_bug.cgi?id=1089245 --- xca.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xca.spec b/xca.spec index 38eb160..4f3fb02 100644 --- a/xca.spec +++ b/xca.spec @@ -3,7 +3,7 @@ Summary: Graphical X.509 certificate management tool Name: xca Version: 0.9.3 -Release: %release_func 4 +Release: %release_func 5 License: BSD Group: Applications/Productivity @@ -136,6 +136,10 @@ gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : %changelog +* Tue Apr 22 2014 Patrick Monnerat - 0.9.3-5 +- Rebuild for elliptic curves inclusion. + https://bugzilla.redhat.com/show_bug.cgi?id=1089245 + * Sun Aug 04 2013 Fedora Release Engineering - 0.9.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From ff8eaa120c64dea73b49b6bf1406c80ddfbff801 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Tue, 28 Oct 2014 17:58:51 +0100 Subject: [PATCH 2/4] New upstream release. --- .gitignore | 1 + sources | 2 +- xca-0.9.3-french.patch | 12 ------ xca.spec | 83 ++++++++++++++++++++++++++++-------------- 4 files changed, 57 insertions(+), 41 deletions(-) delete mode 100644 xca-0.9.3-french.patch diff --git a/.gitignore b/.gitignore index de64401..fcfe70b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ xca-0.8.1.tar.gz /xca-0.9.1.tar.gz /xca-0.9.2.tar.gz /xca-0.9.3.tar.gz +/xca-1.0.0.tar.gz diff --git a/sources b/sources index 997fb6f..86ed61a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -5e08cf8a93f023b1b3836c203bd0a694 xca-0.9.3.tar.gz +e4e8b04047960cf984801e430a1703ab xca-1.0.0.tar.gz 113ba37a89fe2de69338fcfe3b773a03 README.update diff --git a/xca-0.9.3-french.patch b/xca-0.9.3-french.patch deleted file mode 100644 index bf879ed..0000000 --- a/xca-0.9.3-french.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 4f3fb02..b7427ed 100644 --- a/xca.spec +++ b/xca.spec @@ -1,25 +1,19 @@ -%{!?release_func:%global release_func() %1%{?dist}} - Summary: Graphical X.509 certificate management tool Name: xca -Version: 0.9.3 -Release: %release_func 5 - +Version: 1.0.0 +Release: 1%{?dist} License: BSD Group: Applications/Productivity -URL: http://www.hohnstaedt.de/xca.html +URL: http://xca.hohnstaedt.de/ Source0: http://downloads.sourceforge.net/sourceforge/xca/%{name}-%{version}.tar.gz Source1: README.update -Patch1: xca-0.9.3-french.patch BuildRequires: qt4-devel openssl-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 +Requires: hicolor-icon-theme %description @@ -36,10 +30,11 @@ DER, PKCS#8. All cryptographic data are stored in a byte order agnostic file format, portable across operating systems. +#------------------------------------------------------------------------------- %prep -%setup -q +#------------------------------------------------------------------------------- -%patch1 -p 1 -b .french +%setup -q mkdir -p _tmp_root/usr ln -s "/usr/%{_lib}" _tmp_root/usr/lib @@ -49,8 +44,10 @@ ln -s "%{_includedir}/Qt" _tmp_root/include 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} \ -DXCA_DEFAULT_QT_TRANSLATE=\"\\\"%{_datadir}/qt4/translations\\\"\"" \ @@ -64,12 +61,11 @@ 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 +#------------------------------------------------------------------------------- + make destdir="${RPM_BUILD_ROOT}" mandir=share/man install make destdir="${RPM_BUILD_ROOT}" mandir=share/man install.misc @@ -89,33 +85,53 @@ 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 +# Replace the desktop icon. +rm -rf "${RPM_BUILD_ROOT}%{_datadir}/pixmaps/xca-32x32.xpm" +cp -a img/key.xpm "${RPM_BUILD_ROOT}%{_datadir}/pixmaps/xca.xpm" + desktop-file-install --mode 0644 \ --dir "${RPM_BUILD_ROOT}%{_datadir}/applications" \ --delete-original \ --add-mime-type application/x-xca-database \ --remove-category QT \ + --set-icon=xca \ "${RPM_BUILD_ROOT}%{_datadir}/applications/xca.desktop" - +#------------------------------------------------------------------------------- %post -touch --no-create "%{_datadir}/icons/hicolor" || : +#------------------------------------------------------------------------------- -%preun -touch --no-create "%{_datadir}/icons/hicolor" || : +touch --no-create %{_datadir}/icons/hicolor || : +touch --no-create %{_datadir}/mime/packages &> /dev/null || : + +#------------------------------------------------------------------------------- %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-desktop-database &> /dev/null || : +update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : + + +#------------------------------------------------------------------------------- %postun -update-desktop-database &> /dev/null || : -update-mime-database "%{_datadir}/mime" &> /dev/null || : -gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : +#------------------------------------------------------------------------------- + +if [ "${1}" -eq 0 ] +then touch --no-create %{_datadir}/icons/hicolor || : + gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || : + touch --no-create %{_datadir}/mime/packages &> /dev/null || : + update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : +fi +#------------------------------------------------------------------------------- %files +#------------------------------------------------------------------------------- + +%defattr(-, root, root, -) %doc AUTHORS COPYRIGHT README.update %{_bindir}/* %dir %{_datadir}/xca @@ -126,6 +142,7 @@ gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : %lang(de) %{_datadir}/xca/xca_de.qm %lang(es) %{_datadir}/xca/xca_es.qm %lang(fr) %{_datadir}/xca/xca_fr.qm +%lang(hr) %{_datadir}/xca/xca_hr.qm %lang(ru) %{_datadir}/xca/xca_ru.qm %lang(tr) %{_datadir}/xca/xca_tr.qm %{_datadir}/pixmaps/*.xpm @@ -135,7 +152,17 @@ gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : %attr(0644, root, root) %{_mandir}/*/* +#------------------------------------------------------------------------------- %changelog +#------------------------------------------------------------------------------- + +* Tue Oct 28 2014 Patrick Monnerat 1.0.0-1 +- New upstream release. + Set-up a larger desktop icon. + +* Tue Aug 12 2014 Rex Dieter 0.9.3-7 +- fix/update scriptlets + * Tue Apr 22 2014 Patrick Monnerat - 0.9.3-5 - Rebuild for elliptic curves inclusion. https://bugzilla.redhat.com/show_bug.cgi?id=1089245 @@ -249,7 +276,7 @@ gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : * Thu May 19 2005 Enrico Scholz - 0.5.1-2 - use %%dist instead of %%disttag -* Fri Apr 7 2005 Michael Schwendt +* Thu Apr 7 2005 Michael Schwendt - rebuilt * Tue Mar 8 2005 Enrico Scholz - 0.5.1 From b9ef80e95408b741799ae5813d6da67cfd336ca8 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 17 Nov 2014 17:24:47 +0100 Subject: [PATCH 3/4] Patch "nonstdext" avoids segfault when viewing cert with non-standard extension. https://bugzilla.redhat.com/show_bug.cgi?id=1164340 --- xca-1.0.0-nonstdext.patch | 33 +++++++++++++++++++++++++++++++++ xca.spec | 10 +++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 xca-1.0.0-nonstdext.patch diff --git a/xca-1.0.0-nonstdext.patch b/xca-1.0.0-nonstdext.patch new file mode 100755 index 0000000..3f29462 --- /dev/null +++ b/xca-1.0.0-nonstdext.patch @@ -0,0 +1,33 @@ +From 0baa9173eac0ebe568539e892792921b9ecf7279 Mon Sep 17 00:00:00 2001 +From: Christian Hohnstaedt +Date: Mon, 17 Nov 2014 16:15:42 +0100 +Subject: [PATCH] RedHat Bug #1164340 - segfault when viewing a RHEL entitlement certificate + +...in X509V3_EXT_get v3_lib.c:15 + +Fix the x509v3ext copy constructor +--- + lib/x509v3ext.cpp | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/lib/x509v3ext.cpp b/lib/x509v3ext.cpp +index d94cbda..87bfc63 100644 +--- a/lib/x509v3ext.cpp ++++ b/lib/x509v3ext.cpp +@@ -26,10 +26,9 @@ x509v3ext::x509v3ext(const X509_EXTENSION *n) + + x509v3ext::x509v3ext(const x509v3ext &n) + { +- ext = NULL; +- if (!n.isValid()) +- return; +- set(n.ext); ++ ext = X509_EXTENSION_new(); ++ if (n.ext && n.ext->value && n.ext->value->length > 0) ++ set(n.ext); + } + + x509v3ext::~x509v3ext() +-- +1.7.2.5 + diff --git a/xca.spec b/xca.spec index b7427ed..4625e1f 100644 --- a/xca.spec +++ b/xca.spec @@ -1,12 +1,13 @@ Summary: Graphical X.509 certificate management tool Name: xca Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: Applications/Productivity URL: http://xca.hohnstaedt.de/ Source0: http://downloads.sourceforge.net/sourceforge/xca/%{name}-%{version}.tar.gz Source1: README.update +Patch1: xca-1.0.0-nonstdext.patch BuildRequires: qt4-devel openssl-devel BuildRequires: xdg-utils BuildRequires: ImageMagick @@ -36,6 +37,8 @@ format, portable across operating systems. %setup -q +%patch1 -p1 -b .nonstdext + mkdir -p _tmp_root/usr ln -s "/usr/%{_lib}" _tmp_root/usr/lib ln -s "/%{_lib}" _tmp_root/lib @@ -156,6 +159,11 @@ fi %changelog #------------------------------------------------------------------------------- +* Mon Nov 17 2014 Patrick Monnerat 1.0.0-2 +- Patch "nonstdext" avoids segfault when viewing cert with + non-standard extension. + https://bugzilla.redhat.com/show_bug.cgi?id=1164340 + * Tue Oct 28 2014 Patrick Monnerat 1.0.0-1 - New upstream release. Set-up a larger desktop icon. From 5058ca95fa0ae1e5f536691c75c7d7ccb33fe8b9 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 24 Nov 2014 15:18:59 +0100 Subject: [PATCH 4/4] New upstream release --- .gitignore | 1 + sources | 4 ++-- xca-1.0.0-nonstdext.patch | 33 -------------------------- xca.spec | 50 +++++++++++++++++++-------------------- 4 files changed, 28 insertions(+), 60 deletions(-) delete mode 100755 xca-1.0.0-nonstdext.patch diff --git a/.gitignore b/.gitignore index fcfe70b..e16e240 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ xca-0.8.1.tar.gz /xca-0.9.2.tar.gz /xca-0.9.3.tar.gz /xca-1.0.0.tar.gz +/xca-1.1.0.tar.gz diff --git a/sources b/sources index 86ed61a..624fbce 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -e4e8b04047960cf984801e430a1703ab xca-1.0.0.tar.gz -113ba37a89fe2de69338fcfe3b773a03 README.update +645d3405938c97a3eb0450bbe20234c7 xca-1.1.0.tar.gz +405ca7e03469736ca963407adf97f099 README.update diff --git a/xca-1.0.0-nonstdext.patch b/xca-1.0.0-nonstdext.patch deleted file mode 100755 index 3f29462..0000000 --- a/xca-1.0.0-nonstdext.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0baa9173eac0ebe568539e892792921b9ecf7279 Mon Sep 17 00:00:00 2001 -From: Christian Hohnstaedt -Date: Mon, 17 Nov 2014 16:15:42 +0100 -Subject: [PATCH] RedHat Bug #1164340 - segfault when viewing a RHEL entitlement certificate - -...in X509V3_EXT_get v3_lib.c:15 - -Fix the x509v3ext copy constructor ---- - lib/x509v3ext.cpp | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/lib/x509v3ext.cpp b/lib/x509v3ext.cpp -index d94cbda..87bfc63 100644 ---- a/lib/x509v3ext.cpp -+++ b/lib/x509v3ext.cpp -@@ -26,10 +26,9 @@ x509v3ext::x509v3ext(const X509_EXTENSION *n) - - x509v3ext::x509v3ext(const x509v3ext &n) - { -- ext = NULL; -- if (!n.isValid()) -- return; -- set(n.ext); -+ ext = X509_EXTENSION_new(); -+ if (n.ext && n.ext->value && n.ext->value->length > 0) -+ set(n.ext); - } - - x509v3ext::~x509v3ext() --- -1.7.2.5 - diff --git a/xca.spec b/xca.spec index 4625e1f..cf20556 100644 --- a/xca.spec +++ b/xca.spec @@ -1,13 +1,12 @@ Summary: Graphical X.509 certificate management tool Name: xca -Version: 1.0.0 -Release: 2%{?dist} +Version: 1.1.0 +Release: 1%{?dist} License: BSD Group: Applications/Productivity URL: http://xca.hohnstaedt.de/ Source0: http://downloads.sourceforge.net/sourceforge/xca/%{name}-%{version}.tar.gz Source1: README.update -Patch1: xca-1.0.0-nonstdext.patch BuildRequires: qt4-devel openssl-devel BuildRequires: xdg-utils BuildRequires: ImageMagick @@ -37,13 +36,6 @@ format, portable across operating systems. %setup -q -%patch1 -p1 -b .nonstdext - -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 - install -p -m 644 "%{SOURCE1}" ./ @@ -51,12 +43,10 @@ install -p -m 644 "%{SOURCE1}" ./ %build #------------------------------------------------------------------------------- -export QTDIR="%{_libdir}/qt4" -CC='%{__cxx}' LD='%{__ld}' CFLAGS="${RPM_OPT_FLAGS} \ +%configure CXXFLAGS="${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} + STRIP=: \ + LIBS="-Wl,-as-needed" make %{?_smp_mflags} convert img/xca.ico xca.png @@ -69,8 +59,7 @@ touch -r img/xdb.ico xdb.png %install #------------------------------------------------------------------------------- -make destdir="${RPM_BUILD_ROOT}" mandir=share/man install -make destdir="${RPM_BUILD_ROOT}" mandir=share/man install.misc +make destdir="${RPM_BUILD_ROOT}" install # HACK: check whether workarounds below are still necessary if test ! -e "${RPM_BUILD_ROOT}%{_datadir}/xca/crl.png" @@ -100,6 +89,19 @@ desktop-file-install --mode 0644 \ --set-icon=xca \ "${RPM_BUILD_ROOT}%{_datadir}/applications/xca.desktop" +# Will build the doc directory ourself. + +rm -rf "${RPM_BUILD_ROOT}%{_docdir}/xca" + +# Tag translation files. + +( + cd "${RPM_BUILD_ROOT}" + find '.%{_datadir}/xca' -name 'xca_[a-z][a-z].qm' +) | + sed -e 's/^\.//' \ + -e 's/.*\([a-z][a-z]\).qm$/%lang(\1) &/' > langfiles + #------------------------------------------------------------------------------- %post @@ -131,23 +133,18 @@ fi #------------------------------------------------------------------------------- -%files +%files -f langfiles #------------------------------------------------------------------------------- %defattr(-, root, root, -) %doc AUTHORS COPYRIGHT README.update +%doc doc/*.html %{_bindir}/* +%exclude %{_bindir}/xca_db_stat %dir %{_datadir}/xca %{_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(hr) %{_datadir}/xca/xca_hr.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}.* @@ -159,6 +156,9 @@ fi %changelog #------------------------------------------------------------------------------- +* Mon Nov 24 2014 Patrick Monnerat 1.1.0-1 +- New upstream release + * Mon Nov 17 2014 Patrick Monnerat 1.0.0-2 - Patch "nonstdext" avoids segfault when viewing cert with non-standard extension.