--- flickrfs-1.3.9.1.orig/debian/changelog +++ flickrfs-1.3.9.1/debian/changelog @@ -0,0 +1,146 @@ +flickrfs (1.3.9.1-9.2ubuntu2) vivid; urgency=medium + + * Fix lack of HTTPS in flickrapi.py; flickr requires https now + + -- Randall Mason Mon, 01 Dec 2014 10:39:05 +0200 + +flickrfs (1.3.9.1-9.2ubuntu1) trusty; urgency=medium + + * Files do not get installed to /usr/share/pyshared anymore, so link the + binary in /usr/lib/python2.7/dist-packages instead to fix FTBFS: + /usr/share/pyshared/flickrfs/flickrfs.py': No such file or directory + + -- Andreas Moog Fri, 07 Feb 2014 18:13:37 +0100 + +flickrfs (1.3.9.1-9.2) unstable; urgency=low + + * Non-maintainer upload. + * Convert to dh_python2 (Closes: #616810). + + -- Luca Falavigna Mon, 27 May 2013 20:41:32 +0200 + +flickrfs (1.3.9.1-9.1) unstable; urgency=low + + * Non-maintainer upload. + * Remove gratuitous dependency on fuse-utils to fix installability on + GNU/kFreeBSD. (Closes: #634744) + + -- Robert Millan Sat, 28 Apr 2012 09:22:12 +0200 + +flickrfs (1.3.9.1-9) unstable; urgency=low + + * Fix the Vcs-Browser header (Closes: #462122) + * flickrfs/config: set add.default.tag:no (Closes: #506937) + * Modify patches/sync.diff: another attempt at fixing flickrfs + hangs/freezes (Closes: #515835) + * Add description to all the patches + * Bump Standards-Version to 3.8.1 + + -- Varun Hiremath Thu, 14 May 2009 04:30:23 -0400 + +flickrfs (1.3.9.1-8) unstable; urgency=low + + * Change Build-Depends: python-central (>= 0.6.0). (Closes: #472035) + * Add myself to Uploaders field. + + -- Torsten Werner Fri, 21 Mar 2008 20:14:08 +0100 + +flickrfs (1.3.9.1-7) unstable; urgency=low + + * Update patches/flickrfs_tag.diff to fix bug with sets creation + (Closes: #432703) + * Add patches/unicode.diff to fix unicode errors + + -- Varun Hiremath Tue, 22 Jan 2008 00:30:40 +0530 + +flickrfs (1.3.9.1-6) unstable; urgency=low + + * Bump debhelper compat to 6 + * Bump up Standards-Version to 3.7.3 + * debian/flickrfs.1: refer to screen(1) instead of linuxjournal.com, + Thanks to Y Giridhar Appaji Nag (Closes: #461737) + * Add patches/fuse_group_exception.diff to catch fuse exception and + display a warning message when user is not added to the fuse group + (Closes: #461662) + * Add patches/key.diff to allow users to set api_key and secret for + authentication through flickrfs config file (Closes: #461664) + * Update manpage to reflect changes in the config file + + -- Varun Hiremath Sun, 20 Jan 2008 19:14:56 +0530 + +flickrfs (1.3.9.1-5) unstable; urgency=low + + * Add a patch to control the 'flickrfs' tag added to the pictures + uploaded, thanks to Magnus Therning (Closes: #435661) + + -- Varun Hiremath Fri, 03 Aug 2007 11:39:25 +0530 + +flickrfs (1.3.9.1-4) unstable; urgency=low + + * Add a patch to include the upstream changes in CVS + + -- Varun Hiremath Tue, 31 Jul 2007 14:17:42 +0530 + +flickrfs (1.3.9.1-3) unstable; urgency=low + + * Add a patch to set fuse.fuse_python_api internally (Closes: #432174) + + -- Varun Hiremath Sun, 08 Jul 2007 11:15:32 +0530 + +flickrfs (1.3.9.1-2) unstable; urgency=low + + * Include a new upstream patch to fix the AttributeError: XMLNode + instance has no attribute 'photo' (Closes: #423031) + * Enhance debian/watch + + -- Varun Hiremath Sat, 16 Jun 2007 00:07:55 +0530 + +flickrfs (1.3.9.1-1) unstable; urgency=low + + * Create a symbolic link for the flickrfs executable in /usr/bin to + avoid changes in the upstream source. Fixes the bug "flickrfs: Dies at + startup" (Closes: #414734) + * Include a temporary patch to fix tag search. Thanks to Klaus Ethgen + (Closes: #416427) + + -- Varun Hiremath Thu, 29 Mar 2007 18:11:48 +0530 + +flickrfs (1.3.9-2) unstable; urgency=low + + * Include an upstream patch for changes in log_exception_wrapper function. + + -- Varun Hiremath Mon, 26 Feb 2007 16:27:37 +0530 + +flickrfs (1.3.9-1) unstable; urgency=low + + * New upstream release + * Update the manpage debian/flickrfs.1 + + -- Varun Hiremath Mon, 12 Feb 2007 22:33:18 +0530 + +flickrfs (1.3-2) unstable; urgency=low + + * Changed config default to /usr/bin/x-www-browser instead of firefox + + -- Alan Woodland Sat, 6 Jan 2007 11:26:31 +0000 + +flickrfs (1.3-1) unstable; urgency=low + + * debian/copyright: + + Upstream accepted the modifications, change the downloaded from URL. + + Change flickrapi.py license to MIT license. + + -- Varun Hiremath Thu, 23 Nov 2006 19:17:55 +0530 + +flickrfs (1.2.9-2) unstable; urgency=low + + * Fixed problem with depends. + + -- Alan Woodland Thu, 9 Nov 2006 10:32:18 +0000 + +flickrfs (1.2.9-1) unstable; urgency=low + + * Initial release (Closes: #378226) + * Add Alan Woodland to Uploaders in debian/control. + + -- Varun Hiremath Thu, 9 Nov 2006 07:41:07 +0530 --- flickrfs-1.3.9.1.orig/debian/compat +++ flickrfs-1.3.9.1/debian/compat @@ -0,0 +1 @@ +6 --- flickrfs-1.3.9.1.orig/debian/control +++ flickrfs-1.3.9.1/debian/control @@ -0,0 +1,40 @@ +Source: flickrfs +Section: utils +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Varun Hiremath +Uploaders: Alan Woodland , + Torsten Werner +X-Python-Version: >= 2.4 +Build-Depends: debhelper (>= 6), cdbs, python-dev (>= 2.6.6-3~), quilt +Build-Depends-Indep: python-fuse +Standards-Version: 3.8.1 +Homepage: http://manishrjain.googlepages.com/flickrfs +Vcs-Svn: https://bollin.googlecode.com/svn/flickrfs/ +Vcs-Browser: http://code.google.com/p/bollin/source/browse/flickrfs + +Package: flickrfs +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-fuse +Recommends: imagemagick, www-browser +Description: virtual filesystem for flickr online photosharing service + Flickrfs is a virtual filesystem which mounts on your machine like + any other partition. Once mounted it retrieves information about your + photos hosted on your flickr account, and shows them as files. You + can easily copy photos from your local machine to this mount and it + will automatically upload them to your flickr account. Similarly you + can copy the files from your mount to the local machine and it will + download your images from flickr. + . + Flickrfs uses FUSE (Filesystem in USErspace) which is a simple + interface for userspace programs to export a virtual filesystem to + the Linux kernel. + . + All the files in the mount have an associated meta file, which + provides access to title, description, tags and license information. + Modifiying any of these fields and saving the meta file will cause + them to be updated on the server also. + . + Flickrfs also includes a syncing mechanism. This allows for automatic + synchronisation of changes done online directly to your local + mountpoint. --- flickrfs-1.3.9.1.orig/debian/copyright +++ flickrfs-1.3.9.1/debian/copyright @@ -0,0 +1,50 @@ +This package was debianized by Varun Hiremath on +Wed, 25 Oct 2006 00:25:40 +0530. + +It was downloaded from http://manishrjain.googlepages.com/flickrfs + +Upstream Author: Manish Rai Jain + +License (except flickrapi.py): + + Copyright © 2005,2006 Manish Rai Jain + Copyright © 2006 Varun Hiremath + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL file. + +License (flickrapi.py): + + Copyright © 2007 Brian "Beej Jorgensen" Hall + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +The Debian packaging is © 2006, Varun Hiremath and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- flickrfs-1.3.9.1.orig/debian/flickrfs.1 +++ flickrfs-1.3.9.1/debian/flickrfs.1 @@ -0,0 +1,360 @@ +.TH flickrfs 1 "November 6, 2006" +.SH NAME +flickrfs - virtual filesystem for flickr online photosharing service +.SH ABOUT +Flickrfs is a virtual filesystem which mounts on your linux machine +like any other partition. Once mounted, it retrieves information about +your photos hosted on your flickr account, and shows them as +files. You can now easily copy photos from your local machine to this +mount, and it will automatically upload them to your flickr +account. Similary, you can copy the files from your mount to your +local machine, and it will download your images from flickr. + +All the files in the mount have a meta file attached to them, which +provides access to title, description, tags, and license +information. Modifying any of these fields and saving the meta file, +will update them on the server as well. + +You can easily specify what is the default resolution of photos that +you wish to upload, and the fs will automatically resize (read +downsize) the photo, and upload it. + +That's not all, the latest verion of flickrfs, provides a syncing +mechanism. This mechanism automatically syncs any changes done online +directly to flickr account (using flickr's web interface or any other +third party apps), to your mount. Thus, any addition/deletion/changes +of sets/images is reflected back to your mount. No stale information! +You just to mount it once, and it can be used forever! +.SH USAGE +.SS +.SS Configuration + +The first time you run flickrfs a directory .flickrfs is +created in your $HOME directory. The directory contains a file named +config.txt. Edit the file, to set the following options: + + [configuration] + browser:/usr/bin/x-www-browser + image.size:1024x768 + sets.sync.int:300 + stream.sync.int:300 + add.default.tag:yes + APIKey:f8aa9917a9ae5e44a87cae657924f42d + Secret:3fbf7144be7eca28 + +The sync intervals are in seconds. The default interval set is +5 mins. The sync of /sets and /stream is irrespective of each other, so +you can change the interval values as you like. + +image.size field specifies the default size that the photos will be +resized to before uploading. If you wish to upload the original size +of photos, leave the value blank as follows. Note that, only a copy of +photo is resized, your original photo will not be resized. + +flickrfs will by default add the tag 'flickrfs' to all pictures the +user uploads. Set add.default.tag to 'no' to disable this feature. + +The default values of API key and Secret used for authentication are +specified in the config file. You may change them if required. + +.SS +.SS Create a screen terminal (Optional) + +What is screen? See screen(1) + +Why? This will keep the fs mounted even when you log out. Next time +you log in, you can directly access the fs, without having to mount it +again. Saves effort! + +$ screen \-S flickrfs +.SS +.SS Mount the filesystem + +Check if fuse module has already been loaded in kernel. + +$ lsmod | grep \-i fuse + +$ sudo modprobe fuse #If not loaded + + First time you are mounting the fs, you need to close all the browser +windows. Secondly, if you are behind a proxy server, set you +http_proxy environment variable in the command line. + +$ export http_proxy="http://proxy.address:port" + +$ flickrfs /mountpoint + +The default web browser used is the system one. If you use something +else, you can set it in config.txt. + +Your browser window will open up, and require you to login, and allow +authentication to flickrfs. Once you do that, close your +window. Flickrfs will now start downloading information. Wait a few +minutes for your sets to populate. If you wish to view your whole +stream, create a directory stream in your mountpoint. + +$ mkdir /mntpoint/stream + +You are ready to GO! +.SS +.SS See flickrfs in action (Optional) +If you wish, you can view exactly what is flickrfs doing, by checking +out the log file present in $HOME/.flickrfs + +$ tail \-f ~/.flickrfs/log +.SS +.SS Unmount the fs +To unmount the filesystem, execute the following command + +$ fusermount \-u /mntpoint/ + +.SH Structure +.SS +.SS +.SS Flickrfs Home Directory $HOME/.flickrfs: +.TP +.B config.txt: +Allows you to set the default image size, and the time interval +for the syncing of /sets and /stream to flickr online server. +.TP +.B log: +log file which keeps record of activity going on in +flickrfs. Useful for debugging purposes. In case you find a bug, post +it along with this file on the mailing list. + +.SS The filesystem mount point contains these following folders by default: +.SS +.SS /sets +/sets folder contains your sets, including your private photos. You +can easily add/delete sets using standard linux commands. +.SS +.SS /tags (contains /tags/personal and /tags/public) +/tags/personal folder allows search based upon tags in your +photostream. Just create a folder (use mkdir) whose name is a colon +delimited tags like 'tag1:tag2:tag3', and the fs will search your +photostream to match all the photos which contain ALL these tags, and +show them as files inside the directory. + +/tags/public does the same thing, but searches for public photos even +outside your photostream. + +.SS /stream (not created by default) +/stream folder will contain ALL the photos that are present and +accessible in your photostream. Obviously these wd also include photos +from your sets. + +This folder is not created by default. You need to create directory +named 'stream' in the root of mount point for the fs to populate the +photos. Once the folder is created, it can't be removed. + +.SH Feature List and Usage +.SS Integration with Berkeley DB - Minimal hardware resource consumption by flickrfs + +flickrfs has been integrated with Berkeley DB using python's bsddb +module. Which means flickrfs would now store the image information in +Berkeley db database, instead of storing it in memory. Let come +millions of images, flickrfs would still consume only negligible +amounts of RAM. Regarding hard disk space, it would be in order of 10s +of Megabytes; not an issue for today's computers. + +.SS +.SS Performance increase + +flickrfs retrieves the sets information in parallel, background +threads. Hence, the directory structure is created quickly, allowing +users to start working. If some sets couldn't be retrieved the first +time, they'd be taken care of when *syncing* kicks in. + +Secondly, full metadata information of images would only be retrieved +when asked for; though they'll always be listed in the directory. Its +just like the way flickrfs handles images. + +.SS +.SS Robust execution of flickr operations on small bandwidth + +Flickr operations, as in, interactions with flickr server are now +fail-safe. flickrfs handles the URLError exceptions thrown by the +operation, checks its result, and retries the operation multiple times +in case of failure. Thus, even if connection is lost temporarily, +flickrfs would continue its operations unaffected. + +.SS +.SS config file would be automatically created + +config.txt file, present in ~/.flickrfs would be created +automatically, if not present. Normally the default values would be +fine, but feel free to change it according to your needs. + +.SS +.SS Bandwidth information of flickr account + +statfs system call is now tied to the bandwidth usage information of +your flickr account. You can view it by running a + +$ df \-h + +.SS +.SS Automatic periodic syncing of fs with online server. + +flickrfs will automatically sync any changes done directly through +flickr web interface/organizer or any other third party apps, to its +local mount dynamically. This include changes to your /sets and +/stream. The photos present in /tags are not synced, simply because +/tags is meant just for searching/downloading purposes. The time +interval can be specified through config.txt file. The default +interval specified is 10 mins. + +.SS +.SS Directly link photos from your stream or tags to sets, without downloading. + +Use your ln command to directly add a photo present in your /stream to +a set. + +$ ln /mntpt/stream/image.jpg /mntpt/sets/yourset/ + +$ ln /mntpt/tags/personal/../image.jpg /mntpt/sets/yourset/ + +OR, if you wish to add a new set altogether, just create a new dir +before executing link (ln). When you execute a mkdir, link your first +photo quickly, so that the set is created online. Otherwise, the sync +thread will delete the new directory, seeing it as incoherent with +online server. + +$ mkdir /mntpoint/sets/newset + +.SS +.SS Automatic resizing of photos while uploading. + +NOTE: This does not affect the original photo. Only a copy is resized, +and uploaded. + +If your photo resolution is high, fs will automatically downsize (a +copy of it, not original photo) to the resolution specified in +config.txt file, before uploading. This also reduces the image's size, +thus useful to people with limited 20MB upload limit. Note that if the +image is smaller than the specified size, it would not be resized, and +the original size will be uploaded. + + +.SS Unicode Support + +More robust unicode support. This feature is still in testing mode, so +if you find any bug, feel free to contact us. + +.SS +.SS Change photo meta data + +Title, Description, Tags, License: Use meta data file associated to +photo. For photo named img1_ID.jpg, the meta data file will be +\.img1_ID.meta. Modify this file, and save it, and the changes will be +updated to the servers. + +$ vim .image1_ID.meta + +You may also use 'sed' to do batch operations. For e.g., To change the +licenses of all photos from license:0 'All rights reserved' to +license:1 'Attribution-NonCommercial-ShareAlike License', execute +this: + +$ sed \-i \-e 's@license:0@license:1@' .*.meta + +.B Permissions: +On the image that you wish to change permissions, execute +these statements: + +$chmod 755 image_ID.jpg #to make photo public + +$chmod 774 image_ID.jpg #to make it available to only friends and +family. Not to public. + +$chmod 764 image_ID.jpg #to make it available to family only + +$chmod 754 image_ID.jpg #to make it available to friends only + +$chmod 744 image_ID.jpg #to make it private + +.B Time: +Modification time of the image is set to its last update time +on flickr, while creation time is set to the time when the image was +uploaded to flickr. + +$ ls \-l #Sort photos in asc. order according to 'last update' + +$ ls \-cl #Sort photos in asc. order according to 'date uploaded' + +.SS +.SS Uploading + +Copy the image to either /sets/yourset or /stream, with the directoy +name as follows: + +$ cp /mycamera/myimage.jpg /mntpoint/stream:tag1:tag2:tag3/ + +and the photo will be uploaded with the three tags, and an additional +tag 'flickrfs'. Spaces in tags are allowed. + +To create a new set, just create a directory in /sets/. The first +photo that you copy or link to that directory will become the primary +photo of that set. When you execute a mkdir, copy your first photo +quickly, so that the set is created online. Otherwise, the sync thread +will delete the new directory, seeing it as incoherent with online +server. + +$ cp /mycamera/myimage.jpg /sets/newset:tag1:tag2:tag3/ + +Note the '/' at the end of the destination paths. This is required to +differentiate b/w a filename and directory. + +Note: /tags/personal can no longer be used for uploading photos. Use +/stream for that. + +.SS +.SS Deleting + +Flickrfs doesn't allow/do deletion of photos. It is to prevent a 'rm +*' accident! + +You can easily remove photos from your sets though. + +$ rm /mntpoint/sets/myset/image1_ID.jpg + +If the photo is the last photo in the set, the set will be deleted +automatically. + +.SS +.SS Searching + +To search your personal photos for tags: tag1, tag2 and tag3; create a +directory in /tags/personal: + +$ mkdir /mntpoint/tags/personal/tags1:tags2:tags3 + +To search public photos, do so in /tags/public. + +The directory will store the results as files, with a maximum of 500 +files. + +.SS +.SS Downloading + +Copy the image from the mount to your local harddisk, and the original +size of the image will be downloaded. If original size if not present, +the accessible largest size of the photo will be downloaded. + +$ cp /mntpoint/../image1_ID.jpg ~/myphotos/ + +.SS +.SS Switch Account + +If you wish to switch account, just delete the folder +$HOMEDIR/.flickr. This will remove your cache, and ask for +authentication next time you mount the fs. + +$ rm \-R ~/.flickr/* + +.SH Flickrfs User Guide Online +Please visit to +read more about flickrfs usage and features. +.SH AUTHOR +This manual page was written by Varun Hiremath , +for the Debian project (but may be used by others). --- flickrfs-1.3.9.1.orig/debian/manpages +++ flickrfs-1.3.9.1/debian/manpages @@ -0,0 +1 @@ +debian/flickrfs.1 --- flickrfs-1.3.9.1.orig/debian/orig-tar.sh +++ flickrfs-1.3.9.1/debian/orig-tar.sh @@ -0,0 +1,10 @@ +#!/bin/sh -e + +# called by uscan with '--upstream-version' + +# move to directory 'tarballs' +if [ -r .svn/deb-layout ]; then + . .svn/deb-layout + mv $3 $origDir + echo "moved $3 to $origDir" +fi --- flickrfs-1.3.9.1.orig/debian/patches/CVS_07_31_2007.diff +++ flickrfs-1.3.9.1/debian/patches/CVS_07_31_2007.diff @@ -0,0 +1,82 @@ +Author: Varun Hiremath +Description: Apply diff from flickrfs CVS 07/31/2007 +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-23 19:02:33.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-23 19:02:33.000000000 +0530 +@@ -282,8 +282,11 @@ + for b in psetOnline: + info = self.transfl.parseInfoFromPhoto(b) + imageTitle = info.get('title','') +- imageTitle = self.__getImageTitle(imageTitle, ++ if hasattr(b, 'originalformat'): ++ imageTitle = self.__getImageTitle(imageTitle, + b['id'], b['originalformat']) ++ else: ++ imageTitle = self.__getImageTitle(imageTitle, b['id']) + path = "%s/%s"%(curdir, imageTitle) + inode = self.inodeCache.get(path) + # This exception throwing is just for debugging. +Index: flickrfs-1.3.9.1/flickrfs/transactions.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/transactions.py 2008-01-23 19:02:33.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/transactions.py 2008-01-23 19:02:33.000000000 +0530 +@@ -332,16 +332,32 @@ + log.error("Error getting photoset list: %s" % (rsp.errormsg)) + return [] + if not hasattr(rsp.photosets[0], "photoset"): ++ log.info("No sets found!") + return [] ++ else: ++ log.info("Sets found!") + return rsp.photosets[0].photoset + + def parseInfoFromPhoto(self, photo, perms=None): + info = {} + info['id'] = photo['id'] + info['title'] = photo['title'].replace('/', '_') +- info['format'] = photo['originalformat'] +- info['dupload'] = photo['dateupload'] +- info['dupdate'] = photo['lastupdate'] ++ # Some pics don't contain originalformat attribute, so set it to jpg by default. ++ try: ++ info['format'] = photo['originalformat'] ++ except KeyError: ++ info['format'] = 'jpg' ++ ++ try: ++ info['dupload'] = photo['dateupload'] ++ except KeyError: ++ info['dupload'] = '0' ++ ++ try: ++ info['dupdate'] = photo['lastupdate'] ++ except KeyError: ++ info['dupdate'] = '0' ++ + info['perms'] = perms + return info + +@@ -357,15 +373,21 @@ + + def getPhotosFromPhotoset(self, photoset_id): + photosPermsMap = {} +- for i in range(1,6): ++ # I'm not utilizing the value part of this dictionary. Its arbitrarily ++ # set to i. ++ for i in range(0,3): + rsp = self.fapi.photosets_getPhotos(auth_token=self.authtoken, + photoset_id=photoset_id, + extras=self.extras, + privacy_filter=str(i)) + if not rsp: + continue ++ if not hasattr(rsp.photoset[0], 'photo'): ++ log.error("Photoset %s Doesn't have attribute photo." % rsp.photoset[0]['id']) ++ continue + for p in rsp.photoset[0].photo: + photosPermsMap[p] = str(i) ++ break + return photosPermsMap + + def getPhotoStream(self, user_id): --- flickrfs-1.3.9.1.orig/debian/patches/flickrfs_tag.diff +++ flickrfs-1.3.9.1/debian/patches/flickrfs_tag.diff @@ -0,0 +1,45 @@ +Author: Varun Hiremath +Description: Add an option in flickrfs config file to diable 'flickrfs' tag addition. +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-26 00:05:16.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-26 00:06:11.000000000 +0530 +@@ -56,6 +56,7 @@ + fconfig.write("image.size:\n") + fconfig.write("sets.sync.int:300\n") + fconfig.write("stream.sync.int:300\n") ++ fconfig.write("add.default.tag:no\n") + fconfig.write("APIKey:f8aa9917a9ae5e44a87cae657924f42d\n") + fconfig.write("Secret:3fbf7144be7eca28\n") + fconfig.close() +@@ -90,6 +91,12 @@ + browserName = cp.get('configuration', 'browser') + except: + pass ++try: ++ add_default_tag = True ++ if cp.get('configuration', 'add.default.tag').lower() == 'no': ++ add_default_tag = False ++except: ++ pass + + # Retrive the resize string. + def GetResizeStr(): +@@ -914,7 +921,8 @@ + + def handleUploadingImage(self, path, inode, taglist): + tags = [ '"%s"'%(a,) for a in taglist] +- tags.append('flickrfs') ++ if add_default_tag: ++ tags.append('flickrfs') + taglist = ' '.join(tags) + log.info('uploading %s with len %s' % + (path, self.imgCache.getBufLen(inode.photoId))) +@@ -1090,6 +1098,6 @@ + server.main() + except(fuse.FuseError): + print "Please make sure that user is added to the fuse group." +- except KeyError: ++ except: + log.error('Got key error. Exiting...') + sys.exit(0) --- flickrfs-1.3.9.1.orig/debian/patches/fuse.diff +++ flickrfs-1.3.9.1/debian/patches/fuse.diff @@ -0,0 +1,15 @@ +Author: Varun Hiremath +Description: Fixes fuse module import +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-20 19:44:51.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-20 19:44:51.000000000 +0530 +@@ -20,6 +20,8 @@ + from glob import glob + from errno import * + from traceback import format_exc ++import fuse ++fuse.fuse_python_api = (0,1) + from fuse import Fuse + import threading + import random, commands --- flickrfs-1.3.9.1.orig/debian/patches/fuse_group_exception.diff +++ flickrfs-1.3.9.1/debian/patches/fuse_group_exception.diff @@ -0,0 +1,18 @@ +Author: Varun Hiremath +Description: Print error message when user is not added to fuse group. +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-20 19:43:24.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-20 19:43:24.000000000 +0530 +@@ -1081,7 +1081,10 @@ + try: + server = Flickrfs() + server.multithreaded = 1; +- server.main() ++ try: ++ server.main() ++ except(fuse.FuseError): ++ print "Please make sure that user is added to the fuse group." + except KeyError: + log.error('Got key error. Exiting...') + sys.exit(0) --- flickrfs-1.3.9.1.orig/debian/patches/key.diff +++ flickrfs-1.3.9.1/debian/patches/key.diff @@ -0,0 +1,43 @@ +Author: Varun Hiremath +Description: Add APIKey and Secret to flickrfs config file. +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-22 21:39:37.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-22 21:43:28.000000000 +0530 +@@ -54,6 +54,8 @@ + fconfig.write("image.size:\n") + fconfig.write("sets.sync.int:300\n") + fconfig.write("stream.sync.int:300\n") ++ fconfig.write("APIKey:f8aa9917a9ae5e44a87cae657924f42d\n") ++ fconfig.write("Secret:3fbf7144be7eca28\n") + fconfig.close() + + # Set up logging +Index: flickrfs-1.3.9.1/flickrfs/transactions.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/transactions.py 2008-01-22 21:39:37.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/transactions.py 2008-01-22 21:43:59.000000000 +0530 +@@ -21,10 +21,20 @@ + import string + import os + import time ++import ConfigParser + +-# flickr auth information +-flickrAPIKey = "f8aa9917a9ae5e44a87cae657924f42d" # API key +-flickrSecret = "3fbf7144be7eca28" # shared "secret" ++homedir = os.getenv('HOME') ++flickrfsHome = os.path.join(homedir, '.flickrfs') ++ ++# flickr auth information (read from config file if specified) ++try: ++ cp = ConfigParser.ConfigParser() ++ cp.read(flickrfsHome + '/config.txt') ++ flickrAPIKey = cp.get('configuration', 'APIKey') # API key ++ flickrSecret = cp.get('configuration', 'Secret') # shared "secret" ++except: ++ flickrAPIKey = "f8aa9917a9ae5e44a87cae657924f42d" # API key ++ flickrSecret = "3fbf7144be7eca28" # shared "secret" + + # Utility functions + def kwdict(**kw): return kw --- flickrfs-1.3.9.1.orig/debian/patches/series +++ flickrfs-1.3.9.1/debian/patches/series @@ -0,0 +1,7 @@ +key.diff +fuse_group_exception.diff +CVS_07_31_2007.diff +fuse.diff +flickrfs_tag.diff +unicode.diff +sync.diff --- flickrfs-1.3.9.1.orig/debian/patches/sync.diff +++ flickrfs-1.3.9.1/debian/patches/sync.diff @@ -0,0 +1,68 @@ +Author: Varun Hiremath +Description: Attempts to fix issues with 'sets' folder creation and hang ups and freezes. +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-26 00:05:16.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-26 00:06:11.000000000 +0530 +@@ -30,7 +30,7 @@ + import inodes + + #Some global definitions and functions +-NUMRETRIES = 3 ++NUMRETRIES = 1 + + #Set up the .flickfs directory. + homedir = os.getenv('HOME') +@@ -126,15 +133,13 @@ + def timerThread(func, func1, interval): + '''Execute func now, followed by func1 every interval seconds + ''' +- t = threading.Timer(0.0, func) +- try: +- t.run() +- except: pass ++ #t = threading.Timer(0.0, func) ++ #try: ++ # t.run() ++ #except: pass + while(interval): +- t = threading.Timer(interval, func1) +- try: +- t.run() +- except: pass ++ time.sleep(interval) ++ background(func1) + + def retryFlickrOp(isNone, func, *args): + # This function helps in retrying the flickr transactions, in case they fail. +@@ -190,9 +195,11 @@ + self._mkdir("/tags") + self._mkdir("/tags/personal") + self._mkdir("/tags/public") +- background(timerThread, self.sets_thread, +- self.sync_sets_thread, sets_sync_int) #sync every 2 minutes +- ++ print "Sets are being populated in the background. Please wait..." ++ self.sets_thread() ++ self.sync_sets_thread() ++ background(timerThread, self.sets_thread, self.sync_sets_thread, sets_sync_int) #sync every 2 minutes ++ print "Sets have been populated. Done." + + def imageResize(self, bufData): + # If no resizing information is present, then return the buffer directly. +@@ -266,7 +273,6 @@ + The beauty of the FUSE python implementation is that with the + python interpreter running in foreground, you can have threads + """ +- print "Sets are being populated in the background." + log.info("sets_thread: started") + self._mkdir("/sets") + for a in self.transfl.getPhotosetList(): +@@ -278,6 +284,7 @@ + set_id = a['id'] + self._mkdir(curdir, id=set_id) + background(self.__populate_set, set_id, curdir) ++ time.sleep(0.5) + + def _sync_code(self, psetOnline, curdir): + psetLocal = set(map(lambda x: x[0], self.getdir(curdir, False))) --- flickrfs-1.3.9.1.orig/debian/patches/unicode.diff +++ flickrfs-1.3.9.1/debian/patches/unicode.diff @@ -0,0 +1,48 @@ +Author: Varun Hiremath +Description: Fixes issues related to unicode strings +Index: flickrfs-1.3.9.1/flickrfs/flickrfs.py +=================================================================== +--- flickrfs-1.3.9.1.orig/flickrfs/flickrfs.py 2008-01-26 00:06:23.000000000 +0530 ++++ flickrfs-1.3.9.1/flickrfs/flickrfs.py 2008-01-26 00:06:23.000000000 +0530 +@@ -106,6 +106,7 @@ + def _log_exception_wrapper(func, *args, **kw): + """Call 'func' with args and kws and log any exception it throws. + """ ++ if func == None: return + for i in range(0, NUMRETRIES): + log.debug("Retry attempt %s for func %s" % (i, func)) + try: +@@ -334,20 +335,23 @@ + + for a in setListOnline: + title = a.title[0].elementText.replace('/', '_') +- if title.strip()=="": +- title = a['id'] +- if (title,0) not in setListLocal: #New set added online +- log.info("%s set has been added online."%(title,)) +- self._mkdir('/sets/'+title, a['id']) +- else: #Present Online +- setListLocal.remove((title,0)) ++ try: ++ if title.strip()=="": ++ title = a['id'] ++ if (title.encode('utf8'),0) not in setListLocal: #New set added online ++ log.info("%s set has been added online."%(title,)) ++ self._mkdir('/sets/'+title, a['id']) ++ else: #Present Online ++ setListLocal.remove((title.encode('utf8'),0)) ++ except: ++ log.debug("setListOnline Unicode error: %s"%(title,)) + for a in setListLocal: #List of sets present locally, but not online +- log.info('Recursively deleting set %s'%(a,)) +- self.rmdir('/sets/'+a[0], online=False, recr=True) ++ log.info('Recursively deleting set %s'%(a,)) ++ self.rmdir('/sets/'+a[0], online=False, recr=True) + + for a in setListOnline: + title = a.title[0].elementText.replace('/', '_') +- curdir = "/sets/" + title ++ curdir = "/sets/" + title.encode('utf8') + if title.strip()=='': + curdir = "/sets/" + a['id'] + set_id = a['id'] --- flickrfs-1.3.9.1.orig/debian/rules +++ flickrfs-1.3.9.1/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +DEB_PYTHON2_MODULE_PACKAGES=flickrfs + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +binary-predeb/flickrfs:: + mkdir -p $(DEB_DESTDIR)/usr/bin + dh_link /usr/lib/python2.7/dist-packages/flickrfs/flickrfs.py /usr/bin/flickrfs + chmod 755 $(DEB_DESTDIR)/usr/lib/python2.7/dist-packages/flickrfs/flickrfs.py + +get-orig-source: + -uscan --upstream-version 0 --- flickrfs-1.3.9.1.orig/debian/watch +++ flickrfs-1.3.9.1/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://manishrjain.googlepages.com/flickrfs flickrfs-(.*)\.tar\.gz \ +debian debian/orig-tar.sh --- flickrfs-1.3.9.1.orig/flickrfs/flickrapi.py +++ flickrfs-1.3.9.1/flickrfs/flickrapi.py @@ -245,7 +245,7 @@ if not self.__handlerCache.has_key(method): def handler(_self = self, _method = method, **arg): _method = "flickr." + _method.replace("_", ".") - url = "http://" + FlickrAPI.flickrHost + \ + url = "https://" + FlickrAPI.flickrHost + \ FlickrAPI.flickrRESTForm arg["method"] = _method # Modified here: use default api_key and auth_token if not supplied @@ -298,7 +298,7 @@ data = {"api_key": self.apiKey, "frob": frob, "perms": perms} data["api_sig"] = self.__sign(data) - return "http://%s%s?%s" % (FlickrAPI.flickrHost, \ + return "https://%s%s?%s" % (FlickrAPI.flickrHost, \ FlickrAPI.flickrAuthForm, urllib.urlencode(data)) #------------------------------------------------------------------- @@ -337,7 +337,7 @@ if not 'api_key' in arg: arg["api_key"] = self.apiKey if not 'auth_token' in arg: arg['auth_token'] = self.token arg["api_sig"] = self.__sign(arg) - url = "http://" + FlickrAPI.flickrHost + FlickrAPI.flickrUploadForm + url = "https://" + FlickrAPI.flickrHost + FlickrAPI.flickrUploadForm # construct POST data # boundary = "===beej=jorgensen==========7d45e178b0434"