From a3d4c650035db29f379656fc8c47a876b5870bac Mon Sep 17 00:00:00 2001 From: Ankur Sinha (Ankur Sinha Gmail) Date: Apr 17 2013 10:02:11 +0000 Subject: - Patching Clean up patches Add a patch for url shortener Add patch for url option --- diff --git a/0001-fpaste-0.3.7.1-fedora-production.patch b/0001-fpaste-0.3.7.1-fedora-production.patch new file mode 100644 index 0000000..4a5655a --- /dev/null +++ b/0001-fpaste-0.3.7.1-fedora-production.patch @@ -0,0 +1,78 @@ +From 319b7c0d8f3956e5a2d0e4d4a4cd40c5b18e386c Mon Sep 17 00:00:00 2001 +From: Clint Savage +Date: Fri, 12 Oct 2012 13:04:12 -0600 +Subject: [PATCH] replace fpaste.org with sticky-notes version fpaste.stg.fp.o + +--- + fpaste | 40 +++++++++++++++++++++++++--------------- + 1 file changed, 25 insertions(+), 15 deletions(-) + +diff --git a/fpaste b/fpaste +index 8899397..7073dcd 100755 +--- a/fpaste ++++ b/fpaste +@@ -19,9 +19,10 @@ + VERSION = '0.3.7.1' + USER_AGENT = 'fpaste/' + VERSION + SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo +-FPASTE_URL = 'http://fpaste.org/' ++#FPASTE_URL = 'http://fpaste.org/' ++FPASTE_URL = 'http://paste.fedoraproject.org/' + +-import os, sys, urllib, urllib2, subprocess ++import os, sys, urllib, urllib2, subprocess, json + from optparse import OptionParser, OptionGroup, SUPPRESS_HELP + + def is_text(text, maxCheck = 100, pctPrintable = 0.75): +@@ -80,7 +81,7 @@ def paste(text, options): + if len(author) > 30: + author = author[0:30-3] + "..." + +- params = urllib.urlencode({'title': title, 'author': author, 'lexer': options.lang, 'content': text, 'expire_options': options.expires}) ++ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'}) + pasteSizeKiB = len(params)/1024.0 + + if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB +@@ -110,18 +111,27 @@ def paste(text, options): + print f.read() + return False + +- url = f.geturl() +- if re.match(FPASTE_URL + '?.+', url): +- return url +- elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': +- # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large +- print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) +- return False +- else: +- print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url +- if options.debug: +- print f.read() +- return False ++# response = f.read() ++ response = json.loads(f.read()) ++ id = [i[1]["id"] for i in response.iteritems()].pop() ++# for k,j in i.iteritems(): ++# print j, k ++ ++ url = "{0}{1}".format(FPASTE_URL, id) ++ return url ++ ++# url = f.geturl() ++# if re.match(FPASTE_URL + '?.+', url): ++# return url ++# elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': ++# # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large ++# print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) ++# return False ++# else: ++# print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url ++# if options.debug: ++# print f.read() ++# return False + + + def sysinfo(show_stderr = False, show_successful_cmds = True, show_failed_cmds = True): +-- +1.7.11.7 + diff --git a/0002-fpaste-0.3.7.1-remove-smolt-code.patch b/0002-fpaste-0.3.7.1-remove-smolt-code.patch new file mode 100644 index 0000000..fc412bf --- /dev/null +++ b/0002-fpaste-0.3.7.1-remove-smolt-code.patch @@ -0,0 +1,22 @@ +--- fpaste.orig 2012-10-19 10:33:40.030190352 +1100 ++++ fpaste 2012-10-19 10:33:47.819151831 +1100 +@@ -195,19 +195,6 @@ + else: + si.append( ('%s' % cmdname, out) ) + +- # public SMOLT url +- try: +- sys.path.append('/usr/share/smolt/client') +- from smolt import get_profile_link, getPubUUID +- from smolt_config import get_config_attr +- smoonurl = get_config_attr("SMOON_URL", "http://smolts.org/") +- pubuuid = getPubUUID() +- puburl = get_profile_link(smoonurl, pubuuid)+os.linesep +- except: +- puburl = None +- si.insert(2, ('Smolt Profile URL', puburl) ) +- +- sys.stderr.write("\n") + + # return in readable indented format + sistr = "=== fpaste %s System Information (fpaste --sysinfo) ===\n" % VERSION diff --git a/0003-fpaste-0.3.7.1-use-expire-option-add-private-option-default-on.patch b/0003-fpaste-0.3.7.1-use-expire-option-add-private-option-default-on.patch new file mode 100644 index 0000000..e205e91 --- /dev/null +++ b/0003-fpaste-0.3.7.1-use-expire-option-add-private-option-default-on.patch @@ -0,0 +1,52 @@ +--- ../fpaste-0.3.7.1.orig/fpaste 2013-04-14 12:57:06.052643012 +1000 ++++ fpaste 2013-04-14 12:56:14.278796939 +1000 +@@ -81,7 +81,7 @@ + if len(author) > 30: + author = author[0:30-3] + "..." + +- params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'}) ++ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'paste_private': options.make_private, 'paste_expire': options.expires, 'api_submit': 'true', 'mode': 'json'}) + pasteSizeKiB = len(params)/1024.0 + + if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB +@@ -116,8 +116,11 @@ + id = [i[1]["id"] for i in response.iteritems()].pop() + # for k,j in i.iteritems(): + # print j, k +- +- url = "{0}{1}".format(FPASTE_URL, id) ++ if options.make_private == 'yes': ++ private_hash = [i[1]["hash"] for i in response.iteritems()].pop() ++ url = "{0}{1}/{2}".format(FPASTE_URL, id, private_hash) ++ else: ++ url = "{0}{1}".format(FPASTE_URL, id) + return url + + # url = f.geturl() +@@ -242,6 +245,7 @@ + validExpiresOpts = [ '3600', '10800', '43200', '86400' ] + validSyntaxOpts = [ 'abap', 'antlr', 'antlr-as', 'antlr-cpp', 'antlr-csharp', 'antlr-java', 'antlr-objc', 'antlr-perl', 'antlr-python', 'antlr-ruby', 'apacheconf', 'applescript', 'as', 'as3', 'aspx-cs', 'aspx-vb', 'basemake', 'bash', 'bat', 'bbcode', 'befunge', 'boo', 'brainfuck', 'c', 'c-objdump', 'cheetah', 'clojure', 'common-lisp', 'console', 'control', 'cpp', 'cpp-objdump', 'csharp', 'css', 'css+django', 'css+erb', 'css+genshitext', 'css+mako', 'css+myghty', 'css+php', 'css+smarty', 'cython', 'd', 'd-objdump', 'delphi', 'diff', 'django', 'dpatch', 'dylan', 'erb', 'erl', 'erlang', 'evoque', 'fortran', 'gas', 'genshi', 'genshitext', 'glsl', 'gnuplot', 'groff', 'haskell', 'html', 'html+cheetah', 'html+django', 'html+evoque', 'html+genshi', 'html+mako', 'html+myghty', 'html+php', 'html+smarty', 'ini', 'io', 'irc', 'java', 'js', 'js+cheetah', 'js+django', 'js+erb', 'js+genshitext', 'js+mako', 'js+myghty', 'js+php', 'js+smarty', 'jsp', 'lhs', 'lighty', 'llvm', 'logtalk', 'lua', 'make', 'mako', 'matlab', 'matlabsession', 'minid', 'modelica', 'moocode', 'mupad', 'mxml', 'myghty', 'mysql', 'nasm', 'newspeak', 'nginx', 'numpy', 'objdump', 'objective-c', 'ocaml', 'perl', 'php', 'pot', 'pov', 'prolog', 'py3tb', 'pycon', 'pytb', 'python', 'python3', 'ragel', 'ragel-c', 'ragel-cpp', 'ragel-d', 'ragel-em', 'ragel-java', 'ragel-objc', 'ragel-ruby', 'raw', 'rb', 'rbcon', 'rebol', 'redcode', 'rhtml', 'rst', 'scala', 'scheme', 'smalltalk', 'smarty', 'sourceslist', 'splus', 'sql', 'sqlite3', 'squidconf', 'tcl', 'tcsh', 'tex', 'text', 'trac-wiki', 'vala', 'vb.net', 'vim', 'xml', 'xml+cheetah', 'xml+django', 'xml+erb', 'xml+evoque', 'xml+mako', 'xml+myghty', 'xml+php', 'xml+smarty', 'xslt', 'yaml' ] + validClipboardSelectionOpts = [ 'primary', 'secondary', 'clipboard' ] ++ validPrivateOpts = [ 'yes', 'no'] + ext2lang_map = { 'sh':'bash', 'bash':'bash', 'bat':'bat', 'c':'c', 'h':'c', 'cpp':'cpp', 'css':'css', 'html':'html', 'htm':'html', 'ini':'ini', 'java':'java', 'js':'js', 'jsp':'jsp', 'pl':'perl', 'php':'php', 'php3':'php', 'py':'python', 'rb':'rb', 'rhtml':'rhtml', 'sql':'sql', 'sqlite':'sqlite3', 'tcl':'tcl', 'vim':'vim', 'xml':'xml' } + + usage = """\ +@@ -265,6 +269,9 @@ + fpasteOrg_group.add_option('-d', dest='desc', help='description of paste; default appends filename(s)', metavar='"DESCRIPTION"') + fpasteOrg_group.add_option('-l', dest='lang', help='language of content for syntax highlighting; default is "%default"; use "list" to show all ' + str(len(validSyntaxOpts)) + ' supported langs', metavar='"LANGUAGE"') + fpasteOrg_group.add_option('-x', dest='expires', help='time before paste is removed; default is %default seconds; valid options: ' + ', '.join(validExpiresOpts), metavar='EXPIRES') ++ #fpasteOrg_group.add_option('-P', dest='paste_private', help='make paste private; default is %default', + ', '.join(validPrivateOpts), metavar='"PRIVATE"') ++ fpasteOrg_group.add_option('-P', '--private', help='make paste private; default is %default; valid options: ' + ', '.join(validPrivateOpts), dest='make_private', metavar='"PRIVATE"') ++ + parser.add_option_group(fpasteOrg_group) + # other options + fpasteProg_group = OptionGroup(parser, "Input/Output Options") +@@ -278,7 +285,7 @@ + fpasteProg_group.add_option('', '--confirm', dest='confirm', help='print paste, and prompt for confirmation before sending', action="store_true", default=False) + parser.add_option_group(fpasteProg_group) + +- parser.set_defaults(desc='', nick='', lang='text', expires=max(validExpiresOpts), selection='primary') ++ parser.set_defaults(desc='', nick='', lang='text', make_private='yes', expires=max(validExpiresOpts), selection='primary' ) + (options, args) = parser.parse_args() + + if options.lang.lower() == 'list': diff --git a/0004-fpaste-0.3.7.1-add-url-option.patch b/0004-fpaste-0.3.7.1-add-url-option.patch new file mode 100644 index 0000000..14f1cb1 --- /dev/null +++ b/0004-fpaste-0.3.7.1-add-url-option.patch @@ -0,0 +1,40 @@ +--- ./fpaste 2013-04-17 19:02:14.915972424 +1000 ++++ ../fpaste-0.3.7.1/fpaste 2013-04-17 19:01:10.061175136 +1000 +@@ -92,7 +92,7 @@ + if not confirm("Send binary data anyway?"): + return False + +- req = urllib2.Request(url=FPASTE_URL, data=params, headers={'User-agent': USER_AGENT}) ++ req = urllib2.Request(url=options.url, data=params, headers={'User-agent': USER_AGENT}) + if options.proxy: + if options.debug: + print >> sys.stderr, "Using proxy: %s" % options.proxy +@@ -118,9 +118,9 @@ + # print j, k + if options.make_private == 'yes': + private_hash = [i[1]["hash"] for i in response.iteritems()].pop() +- url = "{0}{1}/{2}".format(FPASTE_URL, id, private_hash) ++ url = "{0}{1}/{2}".format(options.url, id, private_hash) + else: +- url = "{0}{1}".format(FPASTE_URL, id) ++ url = "{0}{1}".format(options.url, id) + return url + + # url = f.geturl() +@@ -271,6 +271,7 @@ + fpasteOrg_group.add_option('-x', dest='expires', help='time before paste is removed; default is %default seconds; valid options: ' + ', '.join(validExpiresOpts), metavar='EXPIRES') + #fpasteOrg_group.add_option('-P', dest='paste_private', help='make paste private; default is %default', + ', '.join(validPrivateOpts), metavar='"PRIVATE"') + fpasteOrg_group.add_option('-P', '--private', help='make paste private; default is %default; valid options: ' + ', '.join(validPrivateOpts), dest='make_private', metavar='"PRIVATE"') ++ fpasteOrg_group.add_option('-U', '--URL', help='URL of fpaste server; default is %default', dest='url', metavar='"FPASTE URL"') + + parser.add_option_group(fpasteOrg_group) + # other options +@@ -285,7 +286,7 @@ + fpasteProg_group.add_option('', '--confirm', dest='confirm', help='print paste, and prompt for confirmation before sending', action="store_true", default=False) + parser.add_option_group(fpasteProg_group) + +- parser.set_defaults(desc='', nick='', lang='text', make_private='yes', expires=max(validExpiresOpts), selection='primary' ) ++ parser.set_defaults(desc='', nick='', lang='text', make_private='yes', expires=max(validExpiresOpts), selection='primary', url=FPASTE_URL ) + (options, args) = parser.parse_args() + + if options.lang.lower() == 'list': diff --git a/0005-fpaste-0.3.7.1-enable-shortened-urls-check-trailing-slash.patch b/0005-fpaste-0.3.7.1-enable-shortened-urls-check-trailing-slash.patch new file mode 100644 index 0000000..1917aec --- /dev/null +++ b/0005-fpaste-0.3.7.1-enable-shortened-urls-check-trailing-slash.patch @@ -0,0 +1,65 @@ +--- fpaste 2013-04-17 19:22:04.312067171 +1000 ++++ ../fpaste-0.3.7.1/fpaste 2013-04-17 19:24:28.307540642 +1000 +@@ -64,6 +64,15 @@ + else: + return False + ++def get_shortened_url(long_url): ++ """Get shortened URL from paste data""" ++ req = urllib2.Request(url=long_url+'/', data='mode=json') ++ try: ++ f = urllib2.urlopen(req) ++ except urllib2.URLError: ++ return False ++ ++ return json.loads(f.read().replace('\n',''))['result']['short_url'] + + def paste(text, options): + '''send text to fpaste.org and return the URL''' +@@ -121,7 +130,12 @@ + url = "{0}{1}/{2}".format(options.url, id, private_hash) + else: + url = "{0}{1}".format(options.url, id) +- return url ++ ++ short_url = get_shortened_url(url) ++ if short_url: ++ return [url, short_url] ++ else: ++ return [url, url] + + # url = f.geturl() + # if re.match(FPASTE_URL + '?.+', url): +@@ -289,6 +303,10 @@ + parser.set_defaults(desc='', nick='', lang='text', make_private='yes', expires=max(validExpiresOpts), selection='primary', url=FPASTE_URL ) + (options, args) = parser.parse_args() + ++ # Check for trailing slash ++ if options.url[-1] != '/': ++ options.url = options.url + '/' ++ + if options.lang.lower() == 'list': + print 'Valid language syntax options:' + for opt in validSyntaxOpts: +@@ -390,7 +408,7 @@ + if not confirm("OK to send?"): + sys.exit(1) + +- url = paste(text, options) ++ [url, short_url] = paste(text, options) + if url: + # try to save URL in clipboard, and warn but don't error + if options.clipout: +@@ -404,7 +422,11 @@ + #parser.error("'xsel' failure. this usually means you're not running X") + print >> sys.stderr, "WARNING: URL not saved to clipboard" + +- print url ++ if url == short_url: ++ print url ++ else: ++ print short_url + " -> " + url ++ + else: + sys.exit(1) + diff --git a/fpaste-0.3.7.1-fedora-production.patch b/fpaste-0.3.7.1-fedora-production.patch deleted file mode 100644 index 4a5655a..0000000 --- a/fpaste-0.3.7.1-fedora-production.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 319b7c0d8f3956e5a2d0e4d4a4cd40c5b18e386c Mon Sep 17 00:00:00 2001 -From: Clint Savage -Date: Fri, 12 Oct 2012 13:04:12 -0600 -Subject: [PATCH] replace fpaste.org with sticky-notes version fpaste.stg.fp.o - ---- - fpaste | 40 +++++++++++++++++++++++++--------------- - 1 file changed, 25 insertions(+), 15 deletions(-) - -diff --git a/fpaste b/fpaste -index 8899397..7073dcd 100755 ---- a/fpaste -+++ b/fpaste -@@ -19,9 +19,10 @@ - VERSION = '0.3.7.1' - USER_AGENT = 'fpaste/' + VERSION - SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo --FPASTE_URL = 'http://fpaste.org/' -+#FPASTE_URL = 'http://fpaste.org/' -+FPASTE_URL = 'http://paste.fedoraproject.org/' - --import os, sys, urllib, urllib2, subprocess -+import os, sys, urllib, urllib2, subprocess, json - from optparse import OptionParser, OptionGroup, SUPPRESS_HELP - - def is_text(text, maxCheck = 100, pctPrintable = 0.75): -@@ -80,7 +81,7 @@ def paste(text, options): - if len(author) > 30: - author = author[0:30-3] + "..." - -- params = urllib.urlencode({'title': title, 'author': author, 'lexer': options.lang, 'content': text, 'expire_options': options.expires}) -+ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'}) - pasteSizeKiB = len(params)/1024.0 - - if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB -@@ -110,18 +111,27 @@ def paste(text, options): - print f.read() - return False - -- url = f.geturl() -- if re.match(FPASTE_URL + '?.+', url): -- return url -- elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': -- # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large -- print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) -- return False -- else: -- print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url -- if options.debug: -- print f.read() -- return False -+# response = f.read() -+ response = json.loads(f.read()) -+ id = [i[1]["id"] for i in response.iteritems()].pop() -+# for k,j in i.iteritems(): -+# print j, k -+ -+ url = "{0}{1}".format(FPASTE_URL, id) -+ return url -+ -+# url = f.geturl() -+# if re.match(FPASTE_URL + '?.+', url): -+# return url -+# elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': -+# # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large -+# print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) -+# return False -+# else: -+# print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url -+# if options.debug: -+# print f.read() -+# return False - - - def sysinfo(show_stderr = False, show_successful_cmds = True, show_failed_cmds = True): --- -1.7.11.7 - diff --git a/fpaste-0.3.7.1-remove-smolt-code.patch b/fpaste-0.3.7.1-remove-smolt-code.patch deleted file mode 100644 index fc412bf..0000000 --- a/fpaste-0.3.7.1-remove-smolt-code.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- fpaste.orig 2012-10-19 10:33:40.030190352 +1100 -+++ fpaste 2012-10-19 10:33:47.819151831 +1100 -@@ -195,19 +195,6 @@ - else: - si.append( ('%s' % cmdname, out) ) - -- # public SMOLT url -- try: -- sys.path.append('/usr/share/smolt/client') -- from smolt import get_profile_link, getPubUUID -- from smolt_config import get_config_attr -- smoonurl = get_config_attr("SMOON_URL", "http://smolts.org/") -- pubuuid = getPubUUID() -- puburl = get_profile_link(smoonurl, pubuuid)+os.linesep -- except: -- puburl = None -- si.insert(2, ('Smolt Profile URL', puburl) ) -- -- sys.stderr.write("\n") - - # return in readable indented format - sistr = "=== fpaste %s System Information (fpaste --sysinfo) ===\n" % VERSION diff --git a/fpaste-default-private-and-use-expire-option.patch b/fpaste-default-private-and-use-expire-option.patch deleted file mode 100644 index 175065c..0000000 --- a/fpaste-default-private-and-use-expire-option.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- fpaste.orig 2013-02-28 18:39:13.000000000 +0100 -+++ fpaste 2013-02-28 18:35:20.000000000 +0100 -@@ -81,7 +81,7 @@ - if len(author) > 30: - author = author[0:30-3] + "..." - -- params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'}) -+ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'paste_private':'yes', 'paste_expire': options.expires, 'api_submit': 'true', 'mode': 'json'}) - pasteSizeKiB = len(params)/1024.0 - - if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB -@@ -116,8 +116,8 @@ - id = [i[1]["id"] for i in response.iteritems()].pop() - # for k,j in i.iteritems(): - # print j, k -- -- url = "{0}{1}".format(FPASTE_URL, id) -+ private_hash = [i[1]["hash"] for i in response.iteritems()].pop() -+ url = "{0}{1}/{2}".format(FPASTE_URL, id, private_hash) - return url - - # url = f.geturl() diff --git a/fpaste.spec b/fpaste.spec index 5217da7..ac31fb5 100644 --- a/fpaste.spec +++ b/fpaste.spec @@ -1,6 +1,6 @@ Name: fpaste Version: 0.3.7.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A simple tool for pasting info onto fpaste.org BuildArch: noarch Group: Applications/Internet @@ -11,21 +11,30 @@ Source0: https://fedorahosted.org/released/fpaste/fpaste-%{version}.tar.bz2 # Point fpaste to fedora sticky notes staging instance # Thanks Clint for the patch. # https://fedorahosted.org/fpaste/ticket/7#comment:1 -Patch0: %{name}-0.3.7.1-fedora-production.patch +Patch0: 0001-%{name}-0.3.7.1-fedora-production.patch # Remove smolt data from fpaste # https://fedorahosted.org/fpaste/ticket/6 -Patch1: %{name}-0.3.7.1-remove-smolt-code.patch +Patch1: 0002-%{name}-0.3.7.1-remove-smolt-code.patch -Patch2: %{name}-default-private-and-use-expire-option.patch +# Adds an option to make paste private or public, sets default to on +# Makes use of expiry option +Patch2: 0003-%{name}-0.3.7.1-use-expire-option-add-private-option-default-on.patch + +# Enables user to specify another paste bin url +Patch3: 0004-%{name}-0.3.7.1-add-url-option.patch + +# Returns a short url when possible and prints it +# Checks fpaste server instance url for trailing slash +Patch4: 0005-%{name}-0.3.7.1-enable-shortened-urls-check-trailing-slash.patch %description It is often useful to be able to easily paste text to the Fedora -Pastebin at http://fpaste.org and this simple script will do that -and return the resulting URL so that people may examine the -output. This can hopefully help folks who are for some reason -stuck without X, working remotely, or any other reason they may -be unable to paste something into the pastebin +Pastebin at http://paste.fedoraproject.org and this simple script +will do that and return the resulting URL so that people may +examine the output. This can hopefully help folks who are for +some reason stuck without X, working remotely, or any other +reason they may be unable to paste something into the pastebin %prep %setup -q @@ -34,6 +43,8 @@ be unable to paste something into the pastebin %patch0 -p1 %patch1 %patch2 +%patch3 -p1 +%patch4 %build #nothing required @@ -53,6 +64,14 @@ rm -rf %{buildroot} %{_mandir}/man1/fpaste.1.gz %changelog +* Wed Apr 17 2013 Ankur Sinha 0.3.7.1-7 +- Multiple patchs +- URL shortner +- Private option +- Default private on +- Option to use another pastebin +- Rectified summary + * Fri Mar 01 2013 Athmane Madjoudj 0.3.7.1-6 - Add a patch to make private url default and use expire option.