Bug#777372: wheezy-pu: package frogr/0.7-2
Control: tags -1 - moreinfo
On Sat, Feb 07, 2015 at 07:45:58PM +0000, Adam D. Barratt wrote:
> > A working version is Frogr 0.10, which is already in jessie. I was
> > considering to backport it, but since the version in wheezy is no
> > longer usable, what would be the recommended way to go here?
>
> The URL mentioned above suggests that the basic changes are as
> simple as s/http/https/g. Does the version on frogr in wheezy need
> any changes beyond that to become functional once more?
I just discussed this with upstream and it's actually easy to fix,
apart from replacing the API URLs it's also necessary to backport a
fix for a crash in gcrypt.
I'm attaching the debdiff, this is my first attempt to upload a
package to stable so please tell me if I'm overlooking something (I'm
particular, is the version numbering scheme the right one?).
Thanks,
Berto
diff -Nru frogr-0.7/debian/changelog frogr-0.7/debian/changelog
--- frogr-0.7/debian/changelog 2012-05-26 03:50:49.000000000 +0300
+++ frogr-0.7/debian/changelog 2015-02-08 18:36:45.000000000 +0200
@@ -1,3 +1,16 @@
+frogr (0.7-2+deb7u1) stable; urgency=medium
+
+ * use-ssl-api.patch:
+ - Use the SSL endpoints for the Flickr API. The non-SSL API was
+ disabled on June 2014.
+ * fix-gcrypt-crash.patch:
+ - Fix crash in gcrypt.
+ * debian/control:
+ - Remove obsolete DM-Upload-Allowed flag.
+ * Update my e-mail address in debian/*.
+
+ -- Alberto Garcia <berto@igalia.com> Sun, 08 Feb 2015 18:23:00 +0200
+
frogr (0.7-2) unstable; urgency=low
* debian/preferences-general.png: this file was missing from the tarball
diff -Nru frogr-0.7/debian/control frogr-0.7/debian/control
--- frogr-0.7/debian/control 2012-05-26 03:50:49.000000000 +0300
+++ frogr-0.7/debian/control 2015-02-08 18:36:45.000000000 +0200
@@ -1,8 +1,7 @@
Source: frogr
Section: graphics
Priority: optional
-Maintainer: Alberto Garcia <agarcia@igalia.com>
-DM-Upload-Allowed: yes
+Maintainer: Alberto Garcia <berto@igalia.com>
Build-Depends: intltool,
debhelper (>= 9),
libgtk-3-dev | libgtk2.0-dev (>= 2.16),
diff -Nru frogr-0.7/debian/copyright frogr-0.7/debian/copyright
--- frogr-0.7/debian/copyright 2012-05-26 03:50:49.000000000 +0300
+++ frogr-0.7/debian/copyright 2015-02-08 18:36:45.000000000 +0200
@@ -12,7 +12,7 @@
License: LGPL-3
Files: debian/*
-Copyright: 2010-2012 Alberto Garcia <agarcia@igalia.com>
+Copyright: 2010-2012 Alberto Garcia <berto@igalia.com>
License: GPL-3
License: GPL-3
diff -Nru frogr-0.7/debian/patches/fix-gcrypt-crash.patch frogr-0.7/debian/patches/fix-gcrypt-crash.patch
--- frogr-0.7/debian/patches/fix-gcrypt-crash.patch 1970-01-01 02:00:00.000000000 +0200
+++ frogr-0.7/debian/patches/fix-gcrypt-crash.patch 2015-02-08 18:36:45.000000000 +0200
@@ -0,0 +1,47 @@
+From: Mario Sanchez Prada <msanchez@gnome.org>
+Subject: Fix initialization of gcrypt to avoid crashes
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=732475
+Origin: https://git.gnome.org/browse/frogr/commit/?id=d7f4e944aa691244e57a8fcc8f4f0e5f91da8686
+Index: frogr/src/flicksoup/fsp-session.c
+===================================================================
+--- frogr.orig/src/flicksoup/fsp-session.c
++++ frogr/src/flicksoup/fsp-session.c
+@@ -26,6 +26,7 @@
+ #include "fsp-session.h"
+
+ #include <config.h>
++#include <errno.h>
+ #include <gcrypt.h>
+
+ #ifdef HAVE_LIBSOUP_GNOME
+@@ -34,9 +35,13 @@
+ #include <libsoup/soup.h>
+ #endif
+
++#include <pthread.h>
+ #include <stdarg.h>
+ #include <string.h>
+
++/* We need this macro defined to properly initialize gcrypt */
++GCRY_THREAD_OPTION_PTHREAD_IMPL;
++
+ #define FLICKR_API_BASE_URL "https://api.flickr.com/services/rest"
+ #define FLICKR_API_UPLOAD_URL "https://up.flickr.com/services/upload"
+ #define FLICKR_REQUEST_TOKEN_OAUTH_URL "https://www.flickr.com/services/oauth/request_token"
+@@ -486,6 +491,16 @@ fsp_session_init
+ self->priv->using_gnome_proxy = FALSE;
+ self->priv->proxy_uri = NULL;
+
++ /* Apparently, we need to initialize gcrypt not to get a crash:
++ http://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html */
++ if (!gcry_control (GCRYCTL_ANY_INITIALIZATION_P))
++ {
++ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
++ gcry_check_version (NULL);
++ gcry_control (GCRYCTL_INIT_SECMEM, 32768);
++ gcry_control (GCRYCTL_INITIALIZATION_FINISHED);
++ }
++
+ self->priv->soup_session = soup_session_async_new ();
+ }
+
diff -Nru frogr-0.7/debian/patches/series frogr-0.7/debian/patches/series
--- frogr-0.7/debian/patches/series 1970-01-01 02:00:00.000000000 +0200
+++ frogr-0.7/debian/patches/series 2015-02-08 18:36:45.000000000 +0200
@@ -0,0 +1,2 @@
+use-ssl-api.patch
+fix-gcrypt-crash.patch
diff -Nru frogr-0.7/debian/patches/use-ssl-api.patch frogr-0.7/debian/patches/use-ssl-api.patch
--- frogr-0.7/debian/patches/use-ssl-api.patch 1970-01-01 02:00:00.000000000 +0200
+++ frogr-0.7/debian/patches/use-ssl-api.patch 2015-02-08 18:36:45.000000000 +0200
@@ -0,0 +1,35 @@
+From: Mario Sanchez Prada <msanchez@gnome.org>
+Subject: Use SSL endpoints for the Flickr API
+Origin: https://git.gnome.org/browse/frogr/commit/?id=efc896a9b3ab0427af2d7c0a65b7c8303e866038
+Index: frogr/src/flicksoup/fsp-session.c
+===================================================================
+--- frogr.orig/src/flicksoup/fsp-session.c
++++ frogr/src/flicksoup/fsp-session.c
+@@ -37,10 +37,11 @@
+ #include <stdarg.h>
+ #include <string.h>
+
+-#define FLICKR_API_BASE_URL "http://api.flickr.com/services/rest"
+-#define FLICKR_API_UPLOAD_URL "http://api.flickr.com/services/upload"
+-#define FLICKR_REQUEST_TOKEN_OAUTH_URL "http://www.flickr.com/services/oauth/request_token"
+-#define FLICKR_ACCESS_TOKEN_OAUTH_URL "http://www.flickr.com/services/oauth/access_token"
++#define FLICKR_API_BASE_URL "https://api.flickr.com/services/rest"
++#define FLICKR_API_UPLOAD_URL "https://up.flickr.com/services/upload"
++#define FLICKR_REQUEST_TOKEN_OAUTH_URL "https://www.flickr.com/services/oauth/request_token"
++#define FLICKR_ACCESS_TOKEN_OAUTH_URL "https://www.flickr.com/services/oauth/access_token"
++#define FLICKR_AUTHORIZE_OAUTH_URL "https://www.flickr.com/services/oauth/authorize"
+
+ #define OAUTH_CALLBACK_URL "oob"
+ #define OAUTH_SIGNATURE_METHOD "HMAC-SHA1"
+@@ -1826,8 +1827,9 @@ fsp_session_get_auth_url_finish
+ fsp_session_set_token_secret (self, auth_token->token_secret);
+
+ /* Build the authorization url */
+- auth_url = g_strdup_printf ("http://www.flickr.com/services/oauth/authorize"
+- "?oauth_token=%s", auth_token->token);
++ auth_url = g_strdup_printf ("%s?oauth_token=%s",
++ FLICKR_AUTHORIZE_OAUTH_URL,
++ auth_token->token);
+
+ fsp_data_free (FSP_DATA (auth_token));
+ }
Reply to: