summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2006-07-26 08:06:26 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2006-07-26 08:06:26 +0000
commitf312e33e057d98bd0d5fb8922d23fd7d97f3024c (patch)
tree0bbc9bb6c0b770a3390f0ebaf8d9efa846ba388a /net-fs/flickrfs
parentUpdated flickrfs ebuild (diff)
downloadoverlay-f312e33e057d98bd0d5fb8922d23fd7d97f3024c.tar.gz
overlay-f312e33e057d98bd0d5fb8922d23fd7d97f3024c.tar.bz2
overlay-f312e33e057d98bd0d5fb8922d23fd7d97f3024c.zip
Patch corrections for flickrfs
svn path=/stable/; revision=741
Diffstat (limited to 'net-fs/flickrfs')
-rw-r--r--net-fs/flickrfs/Manifest8
-rw-r--r--net-fs/flickrfs/files/flickrfs-1.2.9.patch82
2 files changed, 71 insertions, 19 deletions
diff --git a/net-fs/flickrfs/Manifest b/net-fs/flickrfs/Manifest
index 040139b..d81c0ac 100644
--- a/net-fs/flickrfs/Manifest
+++ b/net-fs/flickrfs/Manifest
@@ -1,7 +1,7 @@
-AUX flickrfs-1.2.9.patch 4157 RMD160 bbe5383981b86c60dee498255ee3eca9eea32512 SHA1 755ffd31b9c4dbf930873cc7bab375c39a17b794 SHA256 221f62839c5767d53b291361777cfcd9d601f5b989d46687834c3f7e41f41e07
-MD5 cb94006d683a5cbfd387860e0f335280 files/flickrfs-1.2.9.patch 4157
-RMD160 bbe5383981b86c60dee498255ee3eca9eea32512 files/flickrfs-1.2.9.patch 4157
-SHA256 221f62839c5767d53b291361777cfcd9d601f5b989d46687834c3f7e41f41e07 files/flickrfs-1.2.9.patch 4157
+AUX flickrfs-1.2.9.patch 5863 RMD160 c665c0703efc025f58cb94eda8a9e844d3b5043a SHA1 87bd40708339eb19a6b391aaa2a7e60b86f8f7be SHA256 e1c6b2e02408d78294b94fe0ccf66ba347ae9711f8eef93605e3e212a85196d7
+MD5 f7f4c5eebd4f60d7f97929eecd863311 files/flickrfs-1.2.9.patch 5863
+RMD160 c665c0703efc025f58cb94eda8a9e844d3b5043a files/flickrfs-1.2.9.patch 5863
+SHA256 e1c6b2e02408d78294b94fe0ccf66ba347ae9711f8eef93605e3e212a85196d7 files/flickrfs-1.2.9.patch 5863
DIST flickrfs-1.2.9.tar 71680 RMD160 3b6746bf88c170cfc94a47ad3e6c71e797cbf7c3 SHA1 8a827e87be5b54a68069713057334d8cd4961b1d SHA256 5a9b33e88489a60d34aca2e8acae3a35caca85303f7f97529637f7d93a57ed10
EBUILD flickrfs-1.2.9.ebuild 710 RMD160 677979d6db391c90882a35ab2dd52ef83f574d32 SHA1 fbeae6eca990a080fea1f449d82fae02fcfb4753 SHA256 d3ebaf39241d15b2c312af607592648ebac6c47130c203f61fb021c865eaaed5
MD5 9935a5266b634d2bfc26cca484916bd7 flickrfs-1.2.9.ebuild 710
diff --git a/net-fs/flickrfs/files/flickrfs-1.2.9.patch b/net-fs/flickrfs/files/flickrfs-1.2.9.patch
index c9ccabc..794a5ef 100644
--- a/net-fs/flickrfs/files/flickrfs-1.2.9.patch
+++ b/net-fs/flickrfs/files/flickrfs-1.2.9.patch
@@ -9,13 +9,19 @@ diff -Naur flickrfs-1.2.9.orig/flickrapi.py flickrfs-1.2.9/flickrapi.py
#
diff -Naur flickrfs-1.2.9.orig/flickrfs.conf flickrfs-1.2.9/flickrfs.conf
--- flickrfs-1.2.9.orig/flickrfs.conf 1970-01-01 01:00:00.000000000 +0100
-+++ flickrfs-1.2.9/flickrfs.conf 2006-07-26 09:16:23.000000000 +0200
-@@ -0,0 +1,18 @@
++++ flickrfs-1.2.9/flickrfs.conf 2006-07-26 09:53:46.000000000 +0200
+@@ -0,0 +1,24 @@
+[USER]
+
+# for out-of-band auth inside a web browser
+browserName : /usr/bin/firefox
+
++# Specify the default file upload size (e.g. 640x512)
++image.size:
++
++# Synchronization intervals
++sets.sync.int:300
++stream.sync.int:300
+
+#-------------------------------------------------------------------
+
@@ -31,7 +37,7 @@ diff -Naur flickrfs-1.2.9.orig/flickrfs.conf flickrfs-1.2.9/flickrfs.conf
+
diff -Naur flickrfs-1.2.9.orig/flickrfs.py flickrfs-1.2.9/flickrfs.py
--- flickrfs-1.2.9.orig/flickrfs.py 2006-05-28 09:07:25.000000000 +0200
-+++ flickrfs-1.2.9/flickrfs.py 2006-07-26 09:28:28.000000000 +0200
++++ flickrfs-1.2.9/flickrfs.py 2006-07-26 09:59:38.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!python
@@ -53,7 +59,7 @@ diff -Naur flickrfs-1.2.9.orig/flickrfs.py flickrfs-1.2.9/flickrfs.py
from flickrapi import FlickrAPI
import random
import commands
-@@ -26,10 +33,8 @@
+@@ -26,10 +33,6 @@
#Some global definitions and functions
DEFAULTBLOCKSIZE = 4*1024 #4KB
@@ -61,40 +67,86 @@ diff -Naur flickrfs-1.2.9.orig/flickrfs.py flickrfs-1.2.9/flickrfs.py
-flickrAPIKey = "f8aa9917a9ae5e44a87cae657924f42d" # API key
-flickrSecret = "3fbf7144be7eca28" # shared "secret"
-browserName = "/usr/bin/firefox" # for out-of-band auth inside a web browser
-+# Import ConfigParser
-+from ConfigParser import ConfigParser
#Set up the .flickfs directory.
homedir = os.getenv('HOME')
-@@ -40,6 +45,19 @@
- # Remove previous metadata files from ~/.flickrfs
+@@ -41,6 +44,24 @@
for a in glob(os.path.join(flickrfsHome, '.*')):
os.remove(os.path.join(flickrfsHome, a))
+
+def read_config(config_file = '/etc/flickrfs/flickrfs.conf'):
++
+ defaults = {
+ 'flickrAPIKey' : "f8aa9917a9ae5e44a87cae657924f42d", # API key
+ 'flickrSecret' : "3fbf7144be7eca28", # shared "secret"
++ 'image.size' : "", # upload image size
++ 'sets.sync.int' : "600", #
++ 'stream.sync.int' : "600", #
+ 'browserName' : "/usr/bin/firefox",} # for out-of-band auth inside a web browser
+
-+ config = ConfigParser(defaults)
-+ config.add_section('USER')
++ config = ConfigParser.ConfigParser(defaults)
++ config.add_section('configuration')
+
+ if os.access(config_file, os.R_OK):
+ config.read(config_file)
+
+ return config
-
++
# Set up logging
log = logging.getLogger('flickrfs')
-@@ -1214,6 +1232,12 @@
+ loghdlr = logging.handlers.RotatingFileHandler(os.path.join(flickrfsHome,'log'), "a", 5242880, 3)
+@@ -49,28 +70,6 @@
+ log.addHandler(loghdlr)
+ log.setLevel(logging.DEBUG)
+
+-cp = ConfigParser.ConfigParser()
+-cp.read(flickrfsHome + '/config.txt')
+-iSizestr = ""
+-sets_sync_int = 600.0
+-stream_sync_int = 600.0
+-try:
+- iSizestr = cp.get('configuration', 'image.size')
+-except:
+- print 'No default size of image found. Will upload original size of images.'
+-try:
+- sets_sync_int = float(cp.get('configuration', 'sets.sync.int'))
+-except:
+- pass
+-try:
+- stream_sync_int = float(cp.get('configuration', 'stream.sync.int'))
+-except:
+- pass
+-try:
+- browserName = cp.get('configuration', 'browser')
+-except:
+- pass
+-
+ #Utility functions.
+ def _log_exception_wrapper(func, *args, **kw):
+ """Call 'func' with args and kws and log any exception it throws.
+@@ -1214,6 +1213,26 @@
if __name__ == '__main__':
+
+ config = read_config()
-+ flickrAPIKey = config.get('USER', 'flickrAPIKey')
-+ flickrSecret = config.get('USER', 'flickrSecret')
-+ browserName = config.get('USER', 'browserName')
++ flickrAPIKey = config.get('configuration', 'flickrAPIKey')
++ flickrSecret = config.get('configuration', 'flickrSecret')
++ browserName = config.get('configuration', 'browserName')
++
++ try:
++ iSizestr = cp.get('configuration', 'image.size')
++ except:
++ print 'No default size of image found. Will upload original size of images.'
++ iSizestr = ""
++ try:
++ sets_sync_int = float(cp.get('configuration', 'sets.sync.int'))
++ except:
++ sets_sync_int = 600.0
++ try:
++ stream_sync_int = float(cp.get('configuration', 'stream.sync.int'))
++ except:
++ stream_sync_int = 600.0
+
try:
server = Flickrfs()