diff -Nru variety-0.6.4/debian/changelog variety-0.6.4/debian/changelog --- variety-0.6.4/debian/changelog 2017-06-19 23:52:11.000000000 +0000 +++ variety-0.6.4/debian/changelog 2017-07-05 19:39:38.000000000 +0000 @@ -1,3 +1,18 @@ +variety (0.6.4-3) unstable; urgency=medium + + * Add new patch remove-panoramio.patch to remove Panoramio support + completely (including unused code and data/ bits). This patch supersedes + disable-panoramio.patch and dont-embed-underscore.diff + * Bump Standards-Version to 4.0.0; no changes needed. + * Add patch remove-outdated-versions-quit.patch: Disable logic bomb based on + configured "outdated versions" - if this is enabled upstream it will cause + specific variety versions to fail to start, and this is probably not what + we want to ship. + * Remove dependency on deprecated gir1.2-webkit-3.0 - Panoramio was the last + bit of code to actually use it. (Closes: #866655) + + -- James Lu Wed, 05 Jul 2017 12:39:38 -0700 + variety (0.6.4-2) unstable; urgency=medium * Upload to unstable. diff -Nru variety-0.6.4/debian/control variety-0.6.4/debian/control --- variety-0.6.4/debian/control 2017-06-18 23:20:36.000000000 +0000 +++ variety-0.6.4/debian/control 2017-07-05 19:32:00.000000000 +0000 @@ -14,7 +14,7 @@ python-pycurl, python-requests Maintainer: James Lu -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 XS-Python-Version: 2.7 Homepage: http://peterlevi.com/variety/ Vcs-Git: https://anonscm.debian.org/cgit/collab-maint/variety.git @@ -29,7 +29,6 @@ gir1.2-gtk-3.0, gir1.2-notify-0.7, gir1.2-pango-1.0, - gir1.2-webkit-3.0, imagemagick, python-bs4, python-cairo, diff -Nru variety-0.6.4/debian/patches/disable-panoramio.patch variety-0.6.4/debian/patches/disable-panoramio.patch --- variety-0.6.4/debian/patches/disable-panoramio.patch 2017-05-06 23:23:12.000000000 +0000 +++ variety-0.6.4/debian/patches/disable-panoramio.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -Author: Balló György -Subject: Disable Panoramio sources, which no longer work - . - This patch was imported from Arch Linux (link below) and modified by James Lu - to migrate away from old Panoramio sources as well. - -From: vendor, https://git.archlinux.org/svntogit/community.git/tree/repos/community-any/fix-popup-menu.patch?h=packages/variety -Forwarded: https://bugs.launchpad.net/variety/+bug/1636389 -Last-Update: 2017-04-17 - -Index: variety/variety/PreferencesVarietyDialog.py -=================================================================== ---- variety.orig/variety/PreferencesVarietyDialog.py 2017-03-24 11:55:52.916033568 -0700 -+++ variety/variety/PreferencesVarietyDialog.py 2017-03-24 11:55:52.912033650 -0700 -@@ -32,7 +32,6 @@ - from variety.AddFlickrDialog import AddFlickrDialog - from variety.AddMediaRssDialog import AddMediaRssDialog - from variety.AddRedditDialog import AddRedditDialog --from variety.AddPanoramioDialog import AddPanoramioDialog - from variety.EditFavoriteOperationsDialog import EditFavoriteOperationsDialog - from variety.SmartFeaturesConfirmationDialog import SmartFeaturesConfirmationDialog - from variety.LoginOrRegisterDialog import LoginOrRegisterDialog -@@ -64,7 +63,6 @@ - EDITABLE_TYPES = [ - Options.SourceType.FLICKR, - Options.SourceType.MEDIA_RSS, -- Options.SourceType.PANORAMIO, - Options.SourceType.WALLHAVEN, - Options.SourceType.REDDIT, - ] -@@ -381,7 +379,6 @@ - '-', - (_("Flickr"), self.on_add_flickr_clicked), - (_("Wallhaven.cc"), self.on_add_wallhaven_clicked), -- (_("Panoramio"), self.on_add_panoramio_clicked), - (_("Reddit"), self.on_add_reddit_clicked), - (_("Media RSS"), self.on_add_mediarss_clicked), - ] -@@ -672,8 +669,6 @@ - self.dialog = AddRedditDialog() - elif type == Options.SourceType.MEDIA_RSS: - self.dialog = AddMediaRssDialog() -- elif type == Options.SourceType.PANORAMIO: -- self.dialog = AddPanoramioDialog() - - self.dialog.set_edited_row(edited_row) - self.show_dialog(self.dialog) -@@ -786,9 +781,6 @@ - def on_add_wallhaven_clicked(self, widget=None): - self.show_dialog(AddWallhavenDialog()) - -- def on_add_panoramio_clicked(self, widget=None): -- self.show_dialog(AddPanoramioDialog()) -- - def show_dialog(self, dialog): - self.dialog = dialog - self.dialog.parent = self -Index: variety/variety/VarietyWindow.py -=================================================================== ---- variety.orig/variety/VarietyWindow.py 2017-03-24 11:55:52.916033568 -0700 -+++ variety/variety/VarietyWindow.py 2017-03-24 11:55:52.912033650 -0700 -@@ -541,8 +541,6 @@ - return UnsplashDownloader(self) - elif type == Options.SourceType.MEDIA_RSS: - return MediaRssDownloader(self, location) -- elif type == Options.SourceType.PANORAMIO: -- return PanoramioDownloader(self, location) - elif type == Options.SourceType.RECOMMENDED: - if self.smart.user: - return MediaRssDownloader(self, '%s/user/%s/recommended/rss' % (Smart.SITE_URL, self.smart.user["id"])) -Index: variety/variety/Options.py -=================================================================== ---- variety.orig/variety/Options.py 2017-03-24 11:55:52.916033568 -0700 -+++ variety/variety/Options.py 2017-03-24 11:56:06.539756948 -0700 -@@ -42,7 +42,6 @@ - APOD = 8 - MEDIA_RSS = 10 - EARTH = 11 -- PANORAMIO = 12 - WALLHAVEN = 13 - REDDIT = 14 - BING = 15 -@@ -60,7 +59,6 @@ - APOD: "apod", - MEDIA_RSS: "mediarss", - EARTH: "earth", -- PANORAMIO: "panoramio", - WALLHAVEN: "wallhaven", - REDDIT: "reddit", - BING: "bing", -@@ -72,7 +70,7 @@ - str_to_type = dict((v,k) for k, v in type_to_str.items()) - - dl_types = [DESKTOPPR, FLICKR, APOD, MEDIA_RSS, EARTH, -- PANORAMIO, WALLHAVEN, REDDIT, BING, UNSPLASH, RECOMMENDED, LATEST] -+ WALLHAVEN, REDDIT, BING, UNSPLASH, RECOMMENDED, LATEST] - - class LightnessMode: - DARK = 0 diff -Nru variety-0.6.4/debian/patches/dont-embed-underscore.diff variety-0.6.4/debian/patches/dont-embed-underscore.diff --- variety-0.6.4/debian/patches/dont-embed-underscore.diff 2017-05-06 23:23:12.000000000 +0000 +++ variety-0.6.4/debian/patches/dont-embed-underscore.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -Subject: Remove embedded copy of libjs-underscore -Author: James Lu -Forwarded: not-needed -Last-Update: 2017-04-17 - -Index: variety/data/panoramio/underscore-min.js -=================================================================== ---- variety.orig/data/panoramio/underscore-min.js 2015-08-25 10:48:15.393027459 -0700 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,6 +0,0 @@ --// Underscore.js 1.6.0 --// http://underscorejs.org --// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors --// Underscore may be freely distributed under the MIT license. --(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,j.property(t))},j.where=function(n,t){return j.filter(n,j.matches(t))},j.findWhere=function(n,t){return j.find(n,j.matches(t))},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-1/0,u=-1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return t=E(t),j.pluck(j.map(n,function(n,e,u){return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===j&&(e[u]=arguments[r++]);for(;r=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=function(n){if(!j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.constant=function(n){return function(){return n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n){return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function(){return(new Date).getTime()};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};T.unescape=j.invert(T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(I[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return j})}).call(this); --//# sourceMappingURL=underscore-min.map -\ No newline at end of file -Index: variety/data/panoramio/panoramio.html -=================================================================== ---- variety.orig/data/panoramio/panoramio.html 2015-08-25 10:48:04.945520407 -0700 -+++ variety/data/panoramio/panoramio.html 2015-08-25 10:48:26.724830642 -0700 -@@ -6,7 +6,7 @@ - - - -- -+ - - - diff -Nru variety-0.6.4/debian/patches/remove-outdated-versions-quit.patch variety-0.6.4/debian/patches/remove-outdated-versions-quit.patch --- variety-0.6.4/debian/patches/remove-outdated-versions-quit.patch 1970-01-01 00:00:00.000000000 +0000 +++ variety-0.6.4/debian/patches/remove-outdated-versions-quit.patch 2017-07-05 19:39:38.000000000 +0000 @@ -0,0 +1,24 @@ +Author: James Lu +Subject: Disable logic bombs based on configured "outdated versions" + . + If this is enabled upstream it will cause specific Variety versions to fail + to start, and this is probably not something we want to ship. + +Forwarded: no +Last-Update: 2017-07-05 + +Index: variety/variety/VarietyWindow.py +=================================================================== +--- variety.orig/variety/VarietyWindow.py 2017-06-30 14:35:16.964051267 -0700 ++++ variety/variety/VarietyWindow.py 2017-06-30 14:35:16.960051252 -0700 +@@ -976,10 +976,6 @@ + logger.info(lambda: "Fetched server options: %s" % str(self.server_options)) + if self.preferences_dialog: + self.preferences_dialog.update_status_message() +- +- if varietyconfig.get_version() in self.server_options.get('outdated_versions', []): +- self.show_notification('Version unsupported', OUTDATED_MSG) +- GObject.idle_add(self.on_quit) + except Exception: + logger.exception(lambda: "Could not fetch Variety serverside options") + if attempts < 5: diff -Nru variety-0.6.4/debian/patches/remove-panoramio.patch variety-0.6.4/debian/patches/remove-panoramio.patch --- variety-0.6.4/debian/patches/remove-panoramio.patch 1970-01-01 00:00:00.000000000 +0000 +++ variety-0.6.4/debian/patches/remove-panoramio.patch 2017-07-05 18:50:36.000000000 +0000 @@ -0,0 +1,606 @@ +Author: James Lu +Subject: Disable and remove Panoramio sources, which no longer work + . + This patch is based on the work of Balló György in + Arch Linux (https://git.archlinux.org/svntogit/community.git/tree/repos/community-any/disable-panoramio.patch?h=packages/variety&id=f5d12bd081948e21ff9d1948dd5fa9da622f6b55), + but modified to migrate away from old Panoramio sources as well. +Forwarded: https://code.launchpad.net/~tacocat/variety/remove-panoramio/+merge/326627 +Last-Update: 2017-06-30 + +Index: variety/data/panoramio/panoramio.html +=================================================================== +--- variety.orig/data/panoramio/panoramio.html 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,16 +0,0 @@ +- +- +- +- Panoramio Layer +- +- +- +- +- +- +- +- +- +-
+- +- +Index: variety/data/panoramio/panoramio.js +=================================================================== +--- variety.orig/data/panoramio/panoramio.js 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,101 +0,0 @@ +-var map; +- +-function python(command) { +- console.log('Python command: ' + command); +- window.status = new Date().getTime() + '|' + command; +-} +- +-function initialize() { +- var mapOptions = { +- zoom: 1, +- center: new google.maps.LatLng(0, 20) +- //mapTypeId: google.maps.MapTypeId.SATELLITE +- }; +- +- map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); +- +- var panoramioLayer = new google.maps.panoramio.PanoramioLayer(); +- panoramioLayer.setMap(map); +- +- // Create the search box and link it to the UI element. +- var input = document.getElementById('search'); +- map.controls[google.maps.ControlPosition.TOP_LEFT].push(input); +- var searchBox = new google.maps.places.SearchBox(input); +- +- // Listen for the event fired when the user selects an item from the +- // pick list. Retrieve the matching places for that item. +- google.maps.event.addListener(searchBox, 'places_changed', function () { +- var places = searchBox.getPlaces(); +- +- if (places.length == 0) { +- return; +- } +- +- var bounds = new google.maps.LatLngBounds(); +- for (var i = 0, place; place = places[i]; i++) { +- if (place.geometry.viewport) { +- bounds.union(place.geometry.viewport); +- } else { +- bounds.extend(place.geometry.location); +- } +- } +- +- map.fitBounds(bounds); +- }); +- +- // Bias the SearchBox results towards places that are within the bounds of the +- // current map's viewport. +- google.maps.event.addListener(map, 'bounds_changed', function () { +- var bounds = map.getBounds(); +- searchBox.setBounds(bounds); +- }); +- +- google.maps.event.addListenerOnce(map, 'idle', function () { +- document.getElementById('search').style.display = 'block'; +- }); +-} +- +-function setLocation(json) { +- var l = JSON.parse(json, jsonReviver); +- map.setZoom(l["zoom"]); +- map.setCenter(l["center"]); +- if (l["search"]) { +- document.getElementById('search').value = l["search"]; +- } +-} +- +-function reportLocation() { +- var search = document.getElementById('search').value.trim(); +- var data = _.extend((search ? {search: search} : {}), { +- zoom: map.getZoom(), +- center: map.getCenter(), +- minx: map.getBounds().getSouthWest().lng(), +- miny: map.getBounds().getSouthWest().lat(), +- maxx: map.getBounds().getNorthEast().lng(), +- maxy: map.getBounds().getNorthEast().lat() +- }); +- var json = JSON.stringify(data, jsonReplacer); +- console.log("Reporting location: " + json); +- python('location:' + json); +-} +- +-function jsonReplacer(k, v) { +- if (v instanceof google.maps.LatLng) { +- return {lat: v.lat(), lng: v.lng()}; +- } else if (v instanceof google.maps.LatLngBounds) { +- return {sw: v.getSouthWest(), ne: v.getNorthEast()} +- } +- return v; +-} +- +-function jsonReviver(k, v) { +- if (_.isEqual(_.isObject(v) && _.keys(v).sort(), ['lat', 'lng'])) { +- return new google.maps.LatLng(v.lat, v.lng); +- } else if (_.isEqual(_.isObject(v) && _.keys(v).sort(), ['sw', 'ne'])) { +- return new google.maps.LatLngBounds(v.sw, v.ne); +- } +- return v; +-} +- +-google.maps.event.addDomListener(window, 'load', initialize); +- +Index: variety/data/panoramio/style.css +=================================================================== +--- variety.orig/data/panoramio/style.css 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,67 +0,0 @@ +-html, body, #map-canvas { +- height: 100%; +- margin: 0px; +- padding: 0px +-} +- +-#panel { +- position: absolute; +- top: 5px; +- left: 50%; +- margin-left: -180px; +- z-index: 5; +- background-color: #fff; +- padding: 5px; +- border: 1px solid #999; +-} +- +-html, body, #map-canvas { +- height: 100%; +- margin: 0px; +- padding: 0px +-} +- +-.controls { +- margin-top: 16px; +- border: 1px solid transparent; +- border-radius: 2px 0 0 2px; +- box-sizing: border-box; +- -moz-box-sizing: border-box; +- height: 32px; +- outline: none; +- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); +-} +- +-#search { +- background-color: #fff; +- padding: 0 11px 0 13px; +- width: 400px; +- font-family: Roboto; +- font-size: 15px; +- font-weight: 300; +- text-overflow: ellipsis; +- box-shadow: 5px 5px 10px #444; +-} +- +-#search:focus { +- border-color: #4d90fe; +- margin-left: -1px; +- padding-left: 14px; /* Regular padding-left + 1. */ +- width: 401px; +-} +- +-.pac-container { +- font-family: Roboto; +-} +- +-#type-selector { +- color: #fff; +- background-color: #4d90fe; +- padding: 5px 11px 0px 11px; +-} +- +-#type-selector label { +- font-family: Roboto; +- font-size: 13px; +- font-weight: 300; +-} +Index: variety/data/panoramio/underscore-min.js +=================================================================== +--- variety.orig/data/panoramio/underscore-min.js 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,6 +0,0 @@ +-// Underscore.js 1.6.0 +-// http://underscorejs.org +-// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +-// Underscore may be freely distributed under the MIT license. +-(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,j.property(t))},j.where=function(n,t){return j.filter(n,j.matches(t))},j.findWhere=function(n,t){return j.find(n,j.matches(t))},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-1/0,u=-1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return t=E(t),j.pluck(j.map(n,function(n,e,u){return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===j&&(e[u]=arguments[r++]);for(;r=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=function(n){if(!j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.constant=function(n){return function(){return n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n){return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function(){return(new Date).getTime()};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};T.unescape=j.invert(T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(I[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return j})}).call(this); +-//# sourceMappingURL=underscore-min.map +\ No newline at end of file +Index: variety/tests/TestPanoramioDownloader.py +=================================================================== +--- variety.orig/tests/TestPanoramioDownloader.py 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,34 +0,0 @@ +-#!/usr/bin/python2 +-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- +-### BEGIN LICENSE +-# Copyright (c) 2012, Peter Levi +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License version 3, as published +-# by the Free Software Foundation. +-# +-# This program is distributed in the hope that it will be useful, but +-# WITHOUT ANY WARRANTY; without even the implied warranties of +-# MERCHANTABILITY, SATISFACTORY QUALITY, 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, see . +-### END LICENSE +- +-import sys +-import os.path +-import unittest +-from TestDownloader import test_download_one_for +- +-sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))) +- +-from variety.PanoramioDownloader import PanoramioDownloader +- +- +-class TestPanoramioDownloader(unittest.TestCase): +- def test_download_one(self): +- test_download_one_for(self, PanoramioDownloader( +- None, '{"zoom":1,"center":{"lat":0,"lng":20},"minx":-180,"miny":-83.82994542398042,"maxx":180,"maxy":83.82994542398042}')) +- +-if __name__ == '__main__': +- unittest.main() +Index: variety/variety/AddPanoramioDialog.py +=================================================================== +--- variety.orig/variety/AddPanoramioDialog.py 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,114 +0,0 @@ +-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- +-### BEGIN LICENSE +-# Copyright (c) 2012, Peter Levi +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License version 3, as published +-# by the Free Software Foundation. +-# +-# This program is distributed in the hope that it will be useful, but +-# WITHOUT ANY WARRANTY; without even the implied warranties of +-# MERCHANTABILITY, SATISFACTORY QUALITY, 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, see . +-### END LICENSE +-import json +- +-import logging +-import gi +-gi.require_version('WebKit', '3.0') +- +-from gi.repository import Gtk, WebKit, GObject # pylint: disable=E0611 +-from variety.Options import Options +-from variety_lib.helpers import get_builder +-from variety import _, _u +-from variety_lib import varietyconfig +- +-logger = logging.getLogger('variety') +- +-class AddPanoramioDialog(Gtk.Dialog): +- __gtype_name__ = "AddPanoramioDialog" +- +- def __new__(cls): +- """Special static method that's automatically called by Python when +- constructing a new instance of this class. +- +- Returns a fully instantiated AddPanoramioDialog object. +- """ +- builder = get_builder('AddPanoramioDialog') +- new_object = builder.get_object('add_panoramio_dialog') +- new_object.finish_initializing(builder) +- return new_object +- +- def finish_initializing(self, builder): +- """Called when we're finished initializing. +- +- finish_initalizing should be called after parsing the ui definition +- and creating a AddPanoramioDialog object with it in order to +- finish initializing the start of the new AddPanoramioDialog +- instance. +- """ +- # Get a reference to the builder and set up the signals. +- self.builder = builder +- self.ui = builder.get_ui(self) +- self.edited_row = None +- self.load_map() +- +- def set_edited_row(self, edited_row): +- self.edited_row = edited_row +- js = "setLocation('" + edited_row[2] + "')" +- self.js(js) +- +- def path2url(self, path): +- import urllib +- return 'file://' + urllib.pathname2url(path) +- +- def js(self, command): +- logger.debug(lambda: 'Panoramio: js(%s)' % command) +- if hasattr(self, "web_view_loaded"): +- GObject.idle_add(lambda: self.web_view.execute_script(command)) +- else: +- GObject.timeout_add(100, lambda: self.js(command)) +- +- def on_js_action(self, action, argument): +- if action == 'location': +- location = argument +- self.parent.on_add_dialog_okay(Options.SourceType.PANORAMIO, location, self.edited_row) +- self.destroy() +- +- def load_map(self): +- with open(varietyconfig.get_data_file('panoramio/panoramio.html')) as f: +- html = f.read() +- +- self.web_view = WebKit.WebView() +- +- def nav(wv, command): +- if command: +- logger.info(lambda: 'Received command: ' + command) +- command = command[command.index('|') + 1:] +- index = command.index(':') +- action = command[:index] +- argument = command[index + 1:] +- self.on_js_action(action, argument) +- self.web_view.connect("status-bar-text-changed", nav) +- +- def _loaded(wv, data): +- self.web_view_loaded = True +- self.web_view.connect('document-load-finished', _loaded) +- +- self.web_view.load_string(html, "text/html", "UTF-8", self.path2url(varietyconfig.get_data_path()) + '/panoramio/') +- self.web_view.set_visible(True) +- self.ui.scrolledwindow.add(self.web_view) +- +- def on_btn_ok_clicked(self, widget, data=None): +- self.js('reportLocation()') +- +- def on_btn_cancel_clicked(self, widget, data=None): +- self.destroy() +- +- +-if __name__ == "__main__": +- dialog = AddPanoramioDialog() +- dialog.show() +- Gtk.main() +Index: variety/variety/Options.py +=================================================================== +--- variety.orig/variety/Options.py 2017-06-30 13:58:50.328422626 -0700 ++++ variety/variety/Options.py 2017-06-30 13:58:50.316422876 -0700 +@@ -42,7 +42,6 @@ + APOD = 8 + MEDIA_RSS = 10 + EARTH = 11 +- PANORAMIO = 12 + WALLHAVEN = 13 + REDDIT = 14 + BING = 15 +@@ -60,7 +59,6 @@ + APOD: "apod", + MEDIA_RSS: "mediarss", + EARTH: "earth", +- PANORAMIO: "panoramio", + WALLHAVEN: "wallhaven", + REDDIT: "reddit", + BING: "bing", +@@ -72,7 +70,7 @@ + str_to_type = dict((v,k) for k, v in type_to_str.items()) + + dl_types = [DESKTOPPR, FLICKR, APOD, MEDIA_RSS, EARTH, +- PANORAMIO, WALLHAVEN, REDDIT, BING, UNSPLASH, RECOMMENDED, LATEST] ++ WALLHAVEN, REDDIT, BING, UNSPLASH, RECOMMENDED, LATEST] + + class LightnessMode: + DARK = 0 +Index: variety/variety/PanoramioDownloader.py +=================================================================== +--- variety.orig/variety/PanoramioDownloader.py 2017-06-30 13:58:50.328422626 -0700 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,126 +0,0 @@ +-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- +-### BEGIN LICENSE +-# Copyright (c) 2012, Peter Levi +-# This program is free software: you can redistribute it and/or modify it +-# under the terms of the GNU General Public License version 3, as published +-# by the Free Software Foundation. +-# +-# This program is distributed in the hope that it will be useful, but +-# WITHOUT ANY WARRANTY; without even the implied warranties of +-# MERCHANTABILITY, SATISFACTORY QUALITY, 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, see . +-### END LICENSE +-import os +-import urllib +-import json +-import random +- +-import logging +-import time +-from variety import Downloader +-from variety.Util import Util +-from variety_lib import varietyconfig +- +-logger = logging.getLogger('variety') +- +-random.seed() +- +-class PanoramioDownloader(Downloader.Downloader): +- API_URL = "http://www.panoramio.com/map/get_panoramas.php?set=public&from=%d&to=%d&minx=%s&miny=%s&maxx=%s&maxy=%s&size=original" +- +- last_download_time = 0 +- +- def __init__(self, parent, location): +- super(PanoramioDownloader, self).__init__(parent, "panoramio", "Panoramio", location) +- self.parse_location() +- self.last_fill_time = 0 +- self.queue = [] +- +- def convert_to_filename(self, url): +- return "panoramio_" + super(PanoramioDownloader, self).convert_to_filename(url) +- +- def parse_location(self): +- data = json.loads(self.location) +- self.minx = data['minx'] +- self.miny = data['miny'] +- self.maxx = data['maxx'] +- self.maxy = data['maxy'] +- +- def search(self, _from, _to): +- url = PanoramioDownloader.API_URL % (_from, _to, self.minx, self.miny, self.maxx, self.maxy) +- logger.info(lambda: "Performing Panoramio API call: url=%s" % url) +- return Util.fetch_json(url) +- +- def download_one(self): +- min_download_interval, min_fill_queue_interval = self.parse_server_options("panoramio", 0, 0) +- +- if time.time() - PanoramioDownloader.last_download_time < min_download_interval: +- logger.info(lambda: "Minimal interval between Panoramio downloads is %d, skip this attempt" % min_download_interval) +- return None +- +- logger.info(lambda: "Downloading an image from Panoramio, " + self.location) +- logger.info(lambda: "Queue size: %d" % len(self.queue)) +- +- if not self.queue: +- if time.time() - self.last_fill_time < min_fill_queue_interval: +- logger.info(lambda: "Panoramio queue empty, but minimal interval between fill attempts is %d, " +- "will try again later" % min_fill_queue_interval) +- return None +- +- self.fill_queue() +- +- if not self.queue: +- logger.info(lambda: "Panoramio queue still empty after fill request") +- return None +- +- PanoramioDownloader.last_download_time = time.time() +- +- photo = self.queue.pop() +- image = self.save_locally(photo["photo_url"], +- photo["photo_file_url"], +- extra_metadata={"author": photo["owner_name"], +- "authorURL": photo["owner_url"], +- "headline": photo["photo_title"]}) +- +- # Uncomment to overlay Panoramio logo: +- # logo = os.path.join(varietyconfig.get_data_path(), 'panoramio/logo.png') +- # logo_command = u"mogrify -gravity SouthEast -draw 'image Over 70,70 0,0 \"%s\"' \"%s\"" % (logo, image) +- # os.system(logo_command.encode('utf8')) +- +- return image +- +- def fill_queue(self): +- self.last_fill_time = time.time() +- +- logger.info(lambda: "Filling Panoramio queue: " + self.location) +- +- total_count = int(self.search(0, 0)["count"]) +- _from = random.randint(0, max(0, total_count - 100)) +- _to = min(_from + 100, total_count) +- +- data = self.search(_from, _to) +- +- for photo in data["photos"]: +- try: +- width = int(photo["width"]) +- height = int(photo["height"]) +- if self.parent and not self.parent.size_ok(width, height): +- continue +- if self.parent and photo["photo_url"] in self.parent.banned: +- continue +- except Exception: +- # consider ok +- pass +- +- self.queue.append(photo) +- +- random.shuffle(self.queue) +- +- if len(self.queue) >= 20: +- self.queue = self.queue[:len(self.queue)//2] +- # only use randomly half the images - if we ever hit the same page again, we'll still have what to download +- +- logger.info(lambda: "Panoramio queue populated with %d URLs" % len(self.queue)) +Index: variety/variety/PreferencesVarietyDialog.py +=================================================================== +--- variety.orig/variety/PreferencesVarietyDialog.py 2017-06-30 13:58:50.328422626 -0700 ++++ variety/variety/PreferencesVarietyDialog.py 2017-06-30 13:58:50.316422876 -0700 +@@ -32,7 +32,6 @@ + from variety.AddFlickrDialog import AddFlickrDialog + from variety.AddMediaRssDialog import AddMediaRssDialog + from variety.AddRedditDialog import AddRedditDialog +-from variety.AddPanoramioDialog import AddPanoramioDialog + from variety.EditFavoriteOperationsDialog import EditFavoriteOperationsDialog + from variety.SmartFeaturesConfirmationDialog import SmartFeaturesConfirmationDialog + from variety.LoginOrRegisterDialog import LoginOrRegisterDialog +@@ -64,7 +63,6 @@ + EDITABLE_TYPES = [ + Options.SourceType.FLICKR, + Options.SourceType.MEDIA_RSS, +- Options.SourceType.PANORAMIO, + Options.SourceType.WALLHAVEN, + Options.SourceType.REDDIT, + ] +@@ -381,7 +379,6 @@ + '-', + (_("Flickr"), self.on_add_flickr_clicked), + (_("Wallhaven.cc"), self.on_add_wallhaven_clicked), +- (_("Panoramio"), self.on_add_panoramio_clicked), + (_("Reddit"), self.on_add_reddit_clicked), + (_("Media RSS"), self.on_add_mediarss_clicked), + ] +@@ -672,8 +669,6 @@ + self.dialog = AddRedditDialog() + elif type == Options.SourceType.MEDIA_RSS: + self.dialog = AddMediaRssDialog() +- elif type == Options.SourceType.PANORAMIO: +- self.dialog = AddPanoramioDialog() + + self.dialog.set_edited_row(edited_row) + self.show_dialog(self.dialog) +@@ -786,9 +781,6 @@ + def on_add_wallhaven_clicked(self, widget=None): + self.show_dialog(AddWallhavenDialog()) + +- def on_add_panoramio_clicked(self, widget=None): +- self.show_dialog(AddPanoramioDialog()) +- + def show_dialog(self, dialog): + self.dialog = dialog + self.dialog.parent = self +Index: variety/variety/VarietyWindow.py +=================================================================== +--- variety.orig/variety/VarietyWindow.py 2017-06-30 13:58:50.328422626 -0700 ++++ variety/variety/VarietyWindow.py 2017-06-30 13:58:50.320422793 -0700 +@@ -56,7 +56,6 @@ + from variety.RedditDownloader import RedditDownloader + from variety.BingDownloader import BingDownloader + from variety.UnsplashDownloader import UnsplashDownloader +-from variety.PanoramioDownloader import PanoramioDownloader + from variety.DesktopprDownloader import DesktopprDownloader + from variety.APODDownloader import APODDownloader + from variety.FlickrDownloader import FlickrDownloader +@@ -542,8 +541,6 @@ + return UnsplashDownloader(self) + elif type == Options.SourceType.MEDIA_RSS: + return MediaRssDownloader(self, location) +- elif type == Options.SourceType.PANORAMIO: +- return PanoramioDownloader(self, location) + elif type == Options.SourceType.RECOMMENDED: + if self.smart.user: + return MediaRssDownloader(self, '%s/user/%s/recommended/rss' % (Smart.SITE_URL, self.smart.user["id"])) diff -Nru variety-0.6.4/debian/patches/series variety-0.6.4/debian/patches/series --- variety-0.6.4/debian/patches/series 2017-06-17 00:32:01.000000000 +0000 +++ variety-0.6.4/debian/patches/series 2017-07-05 18:50:36.000000000 +0000 @@ -1,3 +1,3 @@ +remove-outdated-versions-quit.patch +remove-panoramio.patch fix-autoscroll-high-cpu.patch -disable-panoramio.patch -dont-embed-underscore.diff