diff --git a/gpgme-1.1.4-warning.patch b/gpgme-1.1.4-warning.patch index 81f2666..da79ac7 100644 --- a/gpgme-1.1.4-warning.patch +++ b/gpgme-1.1.4-warning.patch @@ -9,3 +9,23 @@ gpgme_subkey_t subkey = NULL; gpgme_key_sig_t keysig = NULL; +rungpg.c: In function 'gpg_new': +rungpg.c:489: warning: the address of 'dft_ttyname' will always evaluate as 'true' + +--- gpgme/rungpg.c ++++ gpgme/rungpg.c +@@ -486,14 +486,9 @@ + rc = gpg_error_from_errno (errno); + else + { +- if (dft_ttyname) +- { + rc = add_arg (gpg, "--ttyname"); + if (!rc) + rc = add_arg (gpg, dft_ttyname); +- } +- else +- rc = 0; + if (!rc) + { + rc = _gpgme_getenv ("TERM", &dft_ttytype); diff --git a/gpgme-1.1.5.tar.bz2 b/gpgme-1.1.5.tar.bz2 deleted file mode 100644 index 211616a..0000000 --- a/gpgme-1.1.5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b910b4635b0eb8391b48305984ac894329f709017fff51fba06b98b64261e9e6 -size 713909 diff --git a/gpgme-1.1.6-from-upstream.patch b/gpgme-1.1.6-from-upstream.patch new file mode 100644 index 0000000..7292950 --- /dev/null +++ b/gpgme-1.1.6-from-upstream.patch @@ -0,0 +1,206 @@ +--- gpgme-1.1.6/gpgme/ChangeLog ++++ gpgme-r1301/gpgme/ChangeLog +@@ -1,3 +1,12 @@ ++2008-01-28 Werner Koch ++ ++ * keylist.c (gpgme_get_key): Skip duplicated keys. Fixes bug 876. ++ ++2008-01-14 Marcus Brinkmann ++ ++ * engine-gpgconf.c (gpgconf_config_load_cb): Fix program_name ++ field. ++ + 2008-01-04 Marcus Brinkmann + + * Makefile.am (gpgconf_components): New variable. +--- gpgme-1.1.6/gpgme/engine-gpgconf.c ++++ gpgme-r1301/gpgme/engine-gpgconf.c +@@ -313,8 +310,8 @@ gpgconf_config_load_cb (void *hook, char + + if (fields >= 3) + { +- comp->description = strdup (field[2]); +- if (!comp->description) ++ comp->program_name = strdup (field[2]); ++ if (!comp->program_name) + return gpg_error_from_syserror (); + } + +@@ -457,9 +454,18 @@ gpgconf_config_load_cb2 (void *hook, cha + return gpg_error_from_syserror (); + } + +- err = gpgconf_parse_option (opt, &opt->no_arg_value, field[8]); +- if (err) +- return err; ++ if (opt->flags & GPGME_CONF_NO_ARG_DESC) ++ { ++ opt->no_arg_description = strdup (field[8]); ++ if (!opt->no_arg_description) ++ return gpg_error_from_syserror (); ++ } ++ else ++ { ++ err = gpgconf_parse_option (opt, &opt->no_arg_value, field[8]); ++ if (err) ++ return err; ++ } + + err = gpgconf_parse_option (opt, &opt->value, field[9]); + if (err) +--- gpgme-1.1.6/gpgme/keylist.c ++++ gpgme-r1301/gpgme/keylist.c +@@ -964,11 +964,26 @@ gpgme_get_key (gpgme_ctx_t ctx, const ch + err = gpgme_op_keylist_next (listctx, r_key); + if (!err) + { ++ try_next_key: + err = gpgme_op_keylist_next (listctx, &key); + if (gpgme_err_code (err) == GPG_ERR_EOF) +- err = gpg_error (GPG_ERR_NO_ERROR); ++ err = 0; + else + { ++ if (!err ++ && *r_key && (*r_key)->subkeys && (*r_key)->subkeys->fpr ++ && key && key->subkeys && key->subkeys->fpr ++ && !strcmp ((*r_key)->subkeys->fpr, key->subkeys->fpr)) ++ { ++ /* The fingerprint is identical. We assume that this is ++ the same key and don't mark it as an ambiguous. This ++ problem may occur with corrupted keyrings and has ++ been noticed often with gpgsm. In fact gpgsm uses a ++ similar hack to sort out such duplicates but it can't ++ do that while listing keys. */ ++ gpgme_key_unref (key); ++ goto try_next_key; ++ } + if (!err) + { + gpgme_key_unref (key); +--- gpgme-1.1.6/tests/ChangeLog ++++ gpgme-r1301/tests/ChangeLog +@@ -1,3 +1,20 @@ ++2008-01-28 Marcus Brinkmann ++ ++ * gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~. ++ ++2008-01-10 Marcus Brinkmann ++ ++ * gpg/t-gpgconf.c (main): Allow for dirmngr not to be available. ++ ++ * gpg/Makefile.am (./gpg-agent.conf): Correct pinentry path. ++ ++ * gpg/pinentry: New file. ++ * gpg/Makefile.am (DISTCLEANFILES, all-local): Add gpg-agent.conf ++ (./gpg-agent.conf): New target. ++ (EXTRA_DIST): Add pinentry. ++ ++ * gpg/t-gpgconf.c (main): Exit early if compiled without gpgconf. ++ + 2008-01-04 Marcus Brinkmann + + * gpg/Makefile.am (CLEANFILES): Add pubring.kbx and dirmngr.conf. +--- gpgme-1.1.6/tests/gpg/Makefile.am ++++ gpgme-r1301/tests/gpg/Makefile.am +@@ -38,10 +38,10 @@ TESTS = t-encrypt t-encrypt-sym t-encryp + t-encrypt-large t-file-name t-gpgconf $(tests_unix) + + CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf +-DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf ++DISTCLEANFILES = pubring.gpg~ pubring.kbx~ random_seed gpg.conf gpg-agent.conf + + EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ +- geheim.txt pubkey-1.asc seckey-1.asc ++ geheim.txt pubkey-1.asc seckey-1.asc pinentry + + INCLUDES = -I$(top_srcdir)/gpgme + +@@ -55,7 +55,7 @@ noinst_PROGRAMS = $(TESTS) t-genkey + clean-local: + $(srcdir)/mkdemodirs --clean + +-all-local: ./pubring.gpg ./gpg.conf ++all-local: ./pubring.gpg ./gpg.conf ./gpg-agent.conf + + ./pubring.gpg: $(srcdir)/pubdemo.asc ./Alpha/Secret.gpg + $(GPG) --homedir . --import $(srcdir)/pubdemo.asc +@@ -68,3 +68,7 @@ all-local: ./pubring.gpg ./gpg.conf + ./gpg.conf: + # This is required for t-sig-notations. + echo no-force-v3-sigs > ./gpg.conf ++ ++./gpg-agent.conf: ++# This is required for gpg2, which does not support command fd. ++ echo pinentry-program $(abs_srcdir)/pinentry > ./gpg-agent.conf +--- gpgme-1.1.6/tests/gpg/pinentry ++++ gpgme-r1301/tests/gpg/pinentry +@@ -0,0 +1,22 @@ ++#! /bin/bash ++# Dummy pinentry ++# ++# Copyright 2008 g10 Code GmbH ++# ++# This file is free software; as a special exception the author gives ++# unlimited permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# This file is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. ++ ++echo OK Your orders please ++ ++while read cmd; do ++ case $cmd in ++ GETPIN) echo D abc; echo OK;; ++ *) echo OK;; ++ esac ++done +--- gpgme-1.1.6/tests/gpg/t-gpgconf.c ++++ gpgme-r1301/tests/gpg/t-gpgconf.c +@@ -254,6 +254,11 @@ main (int argc, char **argv) + gpgme_conf_comp_t conf; + gpgme_conf_comp_t comp; + int first; ++ ++#ifndef ENABLE_GPGCONF ++ return 0; ++#endif ++ + init_gpgme (GPGME_PROTOCOL_GPGCONF); + + err = gpgme_new (&ctx); +@@ -287,15 +292,23 @@ main (int argc, char **argv) + comp = conf; + while (comp && strcmp (comp->name, "dirmngr")) + comp = comp->next; +- opt = comp->options; +- while (opt && strcmp (opt->name, "verbose")) +- opt = opt->next; + +- err = gpgme_conf_opt_change (opt, 0, arg); +- fail_if_err (err); +- +- err = gpgme_op_conf_save (ctx, comp); +- fail_if_err (err); ++ if (comp) ++ { ++ opt = comp->options; ++ while (opt && strcmp (opt->name, "verbose")) ++ opt = opt->next; ++ ++ /* Allow for the verbose option not to be there. */ ++ if (opt) ++ { ++ err = gpgme_conf_opt_change (opt, 0, arg); ++ fail_if_err (err); ++ ++ err = gpgme_op_conf_save (ctx, comp); ++ fail_if_err (err); ++ } ++ } + } + #endif + diff --git a/gpgme-1.1.6-makecheck.patch b/gpgme-1.1.6-makecheck.patch new file mode 100644 index 0000000..9a1fcd8 --- /dev/null +++ b/gpgme-1.1.6-makecheck.patch @@ -0,0 +1,13 @@ + +If the dummy pinentry script is not excutable, 10 tests FAIL: + +Index: tests/gpg/Makefile.am +=================================================================== +--- tests/gpg/Makefile.am (revision 1301) ++++ tests/gpg/Makefile.am (working copy) +@@ -71,4 +71,5 @@ + + ./gpg-agent.conf: + # This is required for gpg2, which does not support command fd. ++ chmod +x $(abs_srcdir)/pinentry + echo pinentry-program $(abs_srcdir)/pinentry > ./gpg-agent.conf diff --git a/gpgme-1.1.6.tar.bz2 b/gpgme-1.1.6.tar.bz2 new file mode 100644 index 0000000..fd2ce3e --- /dev/null +++ b/gpgme-1.1.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e91f38b6fe20cffd9872c7af8de224b4193378d51f97f525299d651f0ba185f0 +size 747480 diff --git a/gpgme.changes b/gpgme.changes index 77f840d..c3a0d27 100644 --- a/gpgme.changes +++ b/gpgme.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 6 18:46:13 CET 2008 - bk@suse.de + +- update to version 1.1.6: API extensions, eg for gpgconf thru gpgme +- add upstream patches to run the testsuite non-interactively + ------------------------------------------------------------------- Thu Dec 27 06:59:00 CET 2007 - crrodriguez@suse.de diff --git a/gpgme.spec b/gpgme.spec index 3afaf14..b87b867 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,7 +1,7 @@ # -# spec file for package gpgme (Version 1.1.5) +# spec file for package gpgme (Version 1.1.6) # -# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # @@ -16,10 +16,12 @@ License: GPL v2 or later Group: Productivity/Security PreReq: %install_info_prereq AutoReqProv: on -Version: 1.1.5 -Release: 58 -Source: %{name}-%{version}.tar.bz2 +Version: 1.1.6 +Release: 1 +Source: ftp://ftp.gnupg.org/gcrypt/gpgme/%{name}-%{version}.tar.bz2 Patch1: %{name}-1.1.4-warning.patch +Patch2: gpgme-1.1.6-from-upstream.patch +Patch3: gpgme-1.1.6-makecheck.patch Url: http://www.gnupg.org/related_software/gpgme/ Summary: A Library Designed to Give Applications Easy Access to GnuPG Requires: gpg2 @@ -125,25 +127,39 @@ Authors: %prep %setup -q %patch1 +%patch2 -p1 +%patch3 %build -autoreconf --force --install -export CFLAGS="$RPM_OPT_FLAGS" -%configure --with-gnu-ld --disable-static --with-pic -make -#tests requires user interaction -#check -#make check +sh autogen.sh +# Ensure that a (re)build uses fixed binaries with minimum version because +# in case configure picks GnuPG-1.x, e.g. from /usr/local, this would cause +# testsuite failures: +%configure --disable-static \ + --with-gpg-version=2.0.8 \ + --with-gpgsm-version=2.0.8 \ + --with-gpgconf-version=2.0.8 \ + --with-gpg=%_bindir/gpg2 \ + --with-gpgsm=%_bindir/gpgsm \ + --with-gpgconf=%_bindir/gpgconf %install make DESTDIR=$RPM_BUILD_ROOT install +# Do this now to make /usr/lib/rpm/brp-chuck-la happy: +rm %buildroot/%_libdir/*.la + +%check +# With patch2 and upstream, gpg tests use a dummy pinentry script, so run them: +make check %clean rm -rf $RPM_BUILD_ROOT -%post -n libgpgme11 -p /sbin/ldconfig +%post -n libgpgme11 +%run_ldconfig -%postun -n libgpgme11 -p /sbin/ldconfig +%postun -n libgpgme11 +%run_ldconfig %post %install_info --info-dir=%{_infodir} %{_infodir}/gpgme.info.gz @@ -173,26 +189,28 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/gpgme-config %{_datadir}/aclocal/gpgme.m4 %{_includedir}/gpgme.h -%exclude %_libdir/*.la %changelog -* Thu Dec 27 2007 - crrodriguez@suse.de +* Wed Feb 06 2008 bk@suse.de +- update to version 1.1.6: API extensions, eg for gpgconf thru gpgme +- add upstream patches to run the testsuite non-interactively +* Thu Dec 27 2007 crrodriguez@suse.de - fix library-without-ldconfig-post* errors - remove "la" files -* Wed Aug 08 2007 - ro@suse.de +* Wed Aug 08 2007 ro@suse.de - remove devel requires from library package -* Tue Aug 07 2007 - mrueckert@suse.de +* Tue Aug 07 2007 mrueckert@suse.de - add defattr to the lib package -* Mon Aug 06 2007 - zpetrova@suse.cz +* Mon Aug 06 2007 zpetrova@suse.cz - split gpgme to libgpgme11 and gpgme. -* Fri Jul 27 2007 - zpetrova@suse.cz +* Fri Jul 27 2007 zpetrova@suse.cz - update to version 1.1.5 - small bug and portability fixes. -* Wed May 16 2007 - zpetrova@suse.cz +* Wed May 16 2007 zpetrova@suse.cz - removed gpg from Requires list. (#273491) -* Mon Mar 12 2007 - zpetrova@suse.cz +* Mon Mar 12 2007 zpetrova@suse.cz - updated filelist -* Fri Mar 09 2007 - ltinkl@suse.cz +* Fri Mar 09 2007 ltinkl@suse.cz - update to latest version (1.1.4), needed for gpa * Detect and bail out on double plaintext messages. This is required so that applications can properly detect the signed parts of a @@ -200,88 +218,88 @@ rm -rf $RPM_BUILD_ROOT will detect this case too. * Fixed a memory leak in gpgme_data_release_and_get_mem. * Fixed a bug in Windows command line quoting. -* Mon Feb 05 2007 - ro@suse.de +* Mon Feb 05 2007 ro@suse.de - updated filelist -* Wed Sep 20 2006 - anosek@suse.cz +* Wed Sep 20 2006 anosek@suse.cz - fixed compiler warning: variable "key" is used before its value is set [#159104] (warning.patch) -* Mon Jul 17 2006 - nadvornik@suse.cz +* Mon Jul 17 2006 nadvornik@suse.cz - fixed pthread support in gpgme-config -* Wed Jun 28 2006 - zpetrova@suse.cz +* Wed Jun 28 2006 zpetrova@suse.cz - update to version 1.1.2 -* Thu Jan 26 2006 - sbrabec@suse.cz +* Thu Jan 26 2006 sbrabec@suse.cz - Added %%install_info_prereq. -* Wed Jan 25 2006 - mls@suse.de +* Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Sat Jan 14 2006 - kukuk@suse.de +* Sun Jan 15 2006 kukuk@suse.de - Create devel subpackage [#140727] -* Sat Dec 03 2005 - meissner@suse.de +* Sat Dec 03 2005 meissner@suse.de - require libgpg-error-devel (since we include headers that include headers from there). -* Mon Nov 28 2005 - zpetrova@suse.cz +* Mon Nov 28 2005 zpetrova@suse.cz - Update to version 1.0.3 (#135395). -* Thu Feb 17 2005 - didge@suse.de +* Thu Feb 17 2005 didge@suse.de - update to stable version 1.0.2 - update of url -* Mon Jul 12 2004 - adrian@suse.de +* Mon Jul 12 2004 adrian@suse.de - update to version 0.9.0 * support for gpg2 -* Thu Mar 18 2004 - didge@suse.de +* Thu Mar 18 2004 didge@suse.de - fixed bug #36194 -* Fri Feb 27 2004 - ro@suse.de +* Fri Feb 27 2004 ro@suse.de - added libgpg-error to neededforbuild -* Mon Feb 09 2004 - didge@suse.de +* Mon Feb 09 2004 didge@suse.de - version 0.3.16 -* Sat Jan 10 2004 - adrian@suse.de +* Sat Jan 10 2004 adrian@suse.de - add %%run_ldconfig -* Tue Sep 02 2003 - mc@suse.de +* Tue Sep 02 2003 mc@suse.de - add newpg, libgcrypt and libksba to neededforbuild again it is needed to support kmail with cryptplug fixed #29620, #29641 and #29642 -* Mon Aug 11 2003 - adrian@suse.de +* Mon Aug 11 2003 adrian@suse.de - cleanup #neededforbuild and requires -* Tue Aug 05 2003 - adrian@suse.de +* Tue Aug 05 2003 adrian@suse.de - fix libtool handling to get shared libraries -* Thu May 22 2003 - coolo@suse.de +* Thu May 22 2003 coolo@suse.de - fixing info pages -* Wed Apr 16 2003 - coolo@suse.de +* Wed Apr 16 2003 coolo@suse.de - use BuildRoot -* Fri Feb 21 2003 - mc@suse.de +* Fri Feb 21 2003 mc@suse.de - fixed -fPIC and lib64 Problems -* Thu Feb 20 2003 - mc@suse.de +* Thu Feb 20 2003 mc@suse.de - update to version 0.3.15 -* Thu Jan 30 2003 - didge@suse.de +* Thu Jan 30 2003 didge@suse.de - Version 0.3.14 -* Mon Oct 21 2002 - didge@suse.de +* Mon Oct 21 2002 didge@suse.de - Version 0.3.12 -* Wed Sep 25 2002 - ro@suse.de +* Wed Sep 25 2002 ro@suse.de - removed bogus self-provides again -* Wed Sep 25 2002 - didge@suse.de +* Wed Sep 25 2002 didge@suse.de - Version 0.3.11 -* Tue Sep 10 2002 - didge@suse.de +* Tue Sep 10 2002 didge@suse.de - Version 0.3.10 -* Wed Jul 31 2002 - didge@suse.de +* Wed Jul 31 2002 didge@suse.de - Version 0.3.8 -* Fri Jun 21 2002 - didge@suse.de +* Fri Jun 21 2002 didge@suse.de - New Version 0.3.7 -* Fri May 10 2002 - didge@suse.de +* Fri May 10 2002 didge@suse.de - New Version 0.3.6 -* Tue May 07 2002 - ro@suse.de +* Tue May 07 2002 ro@suse.de - fixed specfile: no macro allowed in Version: line -* Fri Mar 08 2002 - didge@suse.de +* Fri Mar 08 2002 didge@suse.de - New Version 0.3.4 -* Thu Feb 14 2002 - didge@suse.de +* Thu Feb 14 2002 didge@suse.de - New Version 0.3.3 -* Fri Jan 04 2002 - didge@suse.de +* Fri Jan 04 2002 didge@suse.de - New Version 0.3.0 -* Wed Oct 31 2001 - didge@suse.de +* Wed Oct 31 2001 didge@suse.de - Fixed patch -* Mon Oct 29 2001 - didge@suse.de +* Mon Oct 29 2001 didge@suse.de - Needs a patch to build on other platforms than i386 -* Tue Oct 09 2001 - didge@suse.de +* Tue Oct 09 2001 didge@suse.de - Version 0.2.3 - needs a patch to build because something is broken?! -* Thu Sep 13 2001 - didge@suse.de +* Thu Sep 13 2001 didge@suse.de - Fix a bug to build under AXP -* Wed Aug 22 2001 - didge@suse.de +* Wed Aug 22 2001 didge@suse.de - First build, Verison 0.2.2