commit wgetpaste for openSUSE:Factory
Hello community, here is the log from the commit of package wgetpaste for openSUSE:Factory checked in at 2014-11-26 10:33:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wgetpaste (Old) and /work/SRC/openSUSE:Factory/.wgetpaste.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "wgetpaste" Changes: -------- --- /work/SRC/openSUSE:Factory/wgetpaste/wgetpaste.changes 2013-07-29 17:51:16.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.wgetpaste.new/wgetpaste.changes 2014-11-26 10:33:29.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Nov 24 13:35:27 UTC 2014 - tchvatal@suse.com + +- Version bump to 2.25 + * Various fixes around bpaste service +- Remove defaults as they are not needed now. +- Apply pinnwand patches for bpaste: + * wgetpaste-2.25-pinwand.patch + * wgetpaste-2.25-pinwand-raw.patch + +------------------------------------------------------------------- Old: ---- opensuse-default.conf wgetpaste-2.22.tar.bz2 New: ---- wgetpaste-2.25-pinwand-raw.patch wgetpaste-2.25-pinwand.patch wgetpaste-2.25.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wgetpaste.spec ++++++ --- /var/tmp/diff_new_pack.8PyhTL/_old 2014-11-26 10:33:30.000000000 +0100 +++ /var/tmp/diff_new_pack.8PyhTL/_new 2014-11-26 10:33:30.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package wgetpaste # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,15 +17,16 @@ Name: wgetpaste -Version: 2.22 +Version: 2.25 Release: 0 -Url: http://wgetpaste.zlin.dk/ -Source: http://wgetpaste.zlin.dk/%name-%version.tar.bz2 -Source1: services.conf -Source2: opensuse-default.conf Summary: Command-line interface to various pastebins License: SUSE-Public-Domain Group: Productivity/Other +Url: http://wgetpaste.zlin.dk/ +Source: http://wgetpaste.zlin.dk/%{name}-%{version}.tar.bz2 +Source1: services.conf +Patch0: wgetpaste-2.25-pinwand.patch +Patch1: wgetpaste-2.25-pinwand-raw.patch Requires: bash Requires: coreutils Requires: wget @@ -37,24 +38,24 @@ %prep %setup -q +%patch0 -p3 +%patch1 -p0 %build # do nothing %install -install -D -m 0755 %name %buildroot%_bindir/%name -install -D -m 0644 %{S:1} %buildroot%_sysconfdir/%name.d/services.conf -install -D -m 0644 %{S:2} %buildroot%_sysconfdir/%name.d/opensuse-default.conf -install -D -m 0644 _%name %buildroot%_datadir/zsh/site-functions/_%name +install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name} +install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}.d/services.conf +install -D -m 0644 _%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %files %defattr(-,root,root,-) -%dir %_sysconfdir/%name.d/ -%dir %_datadir/zsh/site-functions/ -%dir %_datadir/zsh/ -%_datadir/zsh/site-functions/_%name -%config %_sysconfdir/%name.d/services.conf -%config %_sysconfdir/%name.d/opensuse-default.conf -%_bindir/%name +%dir %{_sysconfdir}/%{name}.d/ +%dir %{_datadir}/zsh/site-functions/ +%dir %{_datadir}/zsh/ +%{_datadir}/zsh/site-functions/_%{name} +%config %{_sysconfdir}/%{name}.d/services.conf +%{_bindir}/%{name} %changelog ++++++ services.conf ++++++ --- /var/tmp/diff_new_pack.8PyhTL/_old 2014-11-26 10:33:30.000000000 +0100 +++ /var/tmp/diff_new_pack.8PyhTL/_new 2014-11-26 10:33:30.000000000 +0100 @@ -1,7 +1,4 @@ -SERVICES="${SERVICES} lugons bpaste" +SERVICES="${SERVICES} lugons" ENGINE_lugons=lodgeit URL_lugons="https://paste.lugons.org/" - -ENGINE_bpaste=lodgeit -URL_bpaste="http://bpaste.net" ++++++ wgetpaste-2.25-pinwand-raw.patch ++++++ --- /usr/bin/wgetpaste 2014-09-25 22:20:39.097103971 +0300 +++ wgetpaste 2014-10-09 10:06:41.765195553 +0300 @@ -200,7 +200,7 @@ xml+velocity xml xquery xslt xtend yaml" EXPIRATIONS_pinnwand="1day 1week 1month never" POST_pinnwand="submit=Paste! % % lexer expiry % code" -REGEX_RAW_pinnwand='s|^\(http://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|' +REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\?\)$|\1raw\2|' ### errors die() { ++++++ wgetpaste-2.25-pinwand.patch ++++++ --- /var/tmp/portage/app-text/wgetpaste-2.25-r1/work/wgetpaste-2.25/wgetpaste 2014-05-23 20:51:44.000000000 +0400 +++ /usr/bin/wgetpaste 2014-09-14 16:46:21.345261294 +0400 @@ -16,8 +16,10 @@ ### services SERVICES="bpaste ca codepad dpaste gists poundpython" # bpaste -ENGINE_bpaste=lodgeit -URL_bpaste="http://bpaste.net/" +ENGINE_bpaste=pinnwand +URL_bpaste="https://bpaste.net/" +DEFAULT_EXPIRATION_bpaste="1week" +DEFAULT_LANGUAGE_bpaste="text" # ca ENGINE_ca=ca URL_ca="http://pastebin.ca/" @@ -143,6 +145,62 @@ vim xml xml+cheetah xml+django xml+evoque xml+mako xml+myghty xml+php xml+erb xml+smarty xslt yaml" POST_lodgeit="submit=Paste! % % language % % code" REGEX_RAW_lodgeit='s|^\(http://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|' +# pinnwand +LANGUAGES_pinnwand="ABAP ActionScript%3 ActionScript Ada ANTLR ANTLR%With%ActionScript%Target \ +ANTLR%With%CPP%Target ANTLR%With%C#%Target ANTLR%With%Java%Target ANTLR%With%ObjectiveC%Target \ +ANTLR%With%Perl%Target ANTLR%With%Python%Target ANTLR%With%Ruby%Target ApacheConf AppleScript \ +AspectJ aspx-cs aspx-vb Asymptote autohotkey AutoIt Awk Base%Makefile Bash Bash%Session Batchfile \ +BBCode Befunge BlitzMax Boo Brainfuck Bro BUGS ca65 CBM%BASIC%V2 C C++ C# Ceylon CFEngine3 \ +cfstatement Cheetah Clojure CMake c-objdump COBOL COBOLFree CoffeeScript Coldfusion%HTML Common%Lisp \ +Coq cpp-objdump Croc CSS CSS+Django/Jinja CSS+Genshi%Text CSS+Lasso CSS+Mako CSS+Myghty CSS+PHP \ +CSS+Ruby CSS+Smarty CUDA Cython Darcs%Patch Dart D Debian%Control%file Debian%Sourcelist Delphi dg \ +Diff Django/Jinja d-objdump DTD Duel Dylan DylanLID Dylan%session eC ECL Elixir Elixir%iex%session \ +Embedded%Ragel ERB Erlang Erlang%erl%session Evoque Factor Fancy Fantom Felix Fortran FoxPro FSharp \ +GAS Genshi Genshi%Text Gettext%Catalog Gherkin GLSL Gnuplot Go GoodData-CL Gosu Gosu%Template Groff \ +Groovy Haml Haskell haXe HTML+Cheetah HTML+Django/Jinja HTML+Evoque HTML+Genshi HTML HTML+Lasso \ +HTML+Mako HTML+Myghty HTML+PHP HTML+Smarty HTML+Velocity HTTP Hxml Hybris IDL INI Io Ioke IRC%logs \ +Jade JAGS Java JavaScript+Cheetah JavaScript+Django/Jinja JavaScript+Genshi%Text JavaScript \ +JavaScript+Lasso JavaScript+Mako JavaScript+Myghty JavaScript+PHP JavaScript+Ruby JavaScript+Smarty \ +Java%Server%Page JSON Julia%console Julia Kconfig Koka Kotlin Lasso Lighttpd%configuration%file \ +Literate%Haskell LiveScript LLVM Logos Logtalk Lua Makefile Mako MAQL Mason Matlab Matlab%session \ +MiniD Modelica Modula-2 MoinMoin/Trac%Wiki%markup Monkey MOOCode MoonScript Mscgen MuPAD MXML Myghty \ +MySQL NASM Nemerle NewLisp Newspeak Nginx%configuration%file Nimrod NSIS NumPy objdump Objective-C++ \ +Objective-C Objective-J OCaml Octave Ooc Opa OpenEdge%ABL Perl PHP PL/pgSQL \ +PostgreSQL%console%(psql) PostgreSQL%SQL%dialect PostScript POVRay PowerShell Prolog Properties \ +Protocol%Buffer Puppet PyPy%Log Python%3.0%Traceback Python%3 Python%console%session Python \ +Python%Traceback QML Racket Ragel%in%C%Host Ragel%in%CPP%Host Ragel%in%D%Host Ragel%in%Java%Host \ +Ragel%in%Objective%C%Host Ragel%in%Ruby%Host Ragel Raw%token%data RConsole Rd REBOL Redcode reg \ +reStructuredText RHTML RobotFramework RPMSpec Ruby%irb%session Ruby Rust Sass Scala \ +Scalate%Server%Page Scaml Scheme Scilab SCSS Shell%Session Smali Smalltalk Smarty Snobol SourcePawn \ +sqlite3con SQL SquidConf S Standard%ML Stan systemverilog Tcl Tcsh Tea TeX Text%only Text Treetop \ +TypeScript UrbiScript Vala VB.net Velocity verilog VGL vhdl VimL XML+Cheetah XML+Django/Jinja \ +XML+Evoque XML+Lasso XML+Mako XML+Myghty XML+PHP XML+Ruby XML+Smarty XML+Velocity XML XQuery XSLT \ +Xtend YAML" +LANGUAGE_VALUES_pinnwand="abap as3 as ada antlr antlr-as antlr-cpp antlr-csharp antlr-java \ +antlr-objc antlr-perl antlr-python antlr-ruby apacheconf applescript aspectj aspx-cs aspx-vb asy ahk \ +autoit awk basemake bash console bat bbcode befunge blitzmax boo brainfuck bro bugs ca65 cbmbas c \ +cpp csharp ceylon cfengine3 cfs cheetah clojure cmake c-objdump cobol cobolfree coffee-script cfm \ +common-lisp coq cpp-objdump croc css css+django css+genshitext css+lasso css+mako css+myghty css+php \ +css+erb css+smarty cuda cython dpatch dart d control sourceslist delphi dg diff django d-objdump dtd \ +duel dylan dylan-lid dylan-console ec ecl elixir iex ragel-em erb erlang erl evoque factor fancy fan \ +felix fortran Clipper fsharp gas genshi genshitext pot Cucumber glsl gnuplot go gooddata-cl gosu gst \ +groff groovy haml haskell hx html+cheetah html+django html+evoque html+genshi html html+lasso \ +html+mako html+myghty html+php html+smarty html+velocity http haxeml hybris idl ini io ioke irc jade \ +jags java js+cheetah js+django js+genshitext js js+lasso js+mako js+myghty js+php js+erb js+smarty \ +jsp json jlcon julia kconfig koka kotlin lasso lighty lhs live-script llvm logos logtalk lua make \ +mako maql mason matlab matlabsession minid modelica modula2 trac-wiki monkey moocode moon mscgen \ +mupad mxml myghty mysql nasm nemerle newlisp newspeak nginx nimrod nsis numpy objdump objective-c++ \ +objective-c objective-j ocaml octave ooc opa openedge perl php plpgsql psql postgresql postscript \ +pov powershell prolog properties protobuf puppet pypylog py3tb python3 pycon python pytb qml racket \ +ragel-c ragel-cpp ragel-d ragel-java ragel-objc ragel-ruby ragel raw rconsole rd rebol redcode \ +registry rst rhtml RobotFramework spec rbcon rb rust sass scala ssp scaml scheme scilab scss \ +shell-session smali smalltalk smarty snobol sp sqlite3 sql squidconf splus sml stan systemverilog \ +tcl tcsh tea tex text text treetop ts urbiscript vala vb.net velocity verilog vgl vhdl vim \ +xml+cheetah xml+django xml+evoque xml+lasso xml+mako xml+myghty xml+php xml+erb xml+smarty \ +xml+velocity xml xquery xslt xtend yaml" +EXPIRATIONS_pinnwand="1day 1week 1month never" +POST_pinnwand="submit=Paste! % % lexer expiry % code" +REGEX_RAW_pinnwand='s|^\(http://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|' ### errors die() { @@ -514,7 +572,7 @@ sed -n -e "${!regex}" <<< "$*" else [[ needstdout = $1 ]] && return 1 - sed -n -e 's|^.*Location: \(http://[^ ]*\).*$|\1|p' <<< "$*" + sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*" fi } ++++++ wgetpaste-2.22.tar.bz2 -> wgetpaste-2.25.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.22/wgetpaste new/wgetpaste-2.25/wgetpaste --- old/wgetpaste-2.22/wgetpaste 2013-04-14 15:55:37.000000000 +0200 +++ new/wgetpaste-2.25/wgetpaste 2014-05-23 18:51:44.000000000 +0200 @@ -4,7 +4,7 @@ # Copyright (c) 2007-2009 Bo Ørsted Andresen <bo.andresen@zlin.dk> # Distributed in the public domain. Do with it whatever you want. -VERSION="2.22" +VERSION="2.25" # don't inherit LANGUAGE from the env unset LANGUAGE @@ -85,7 +85,7 @@ Pure%Data Python Python%traceback R Racket Raw%token%data Rebol Redcode reStructuredText RHTML Ruby Rust Sage Sass Scala Scheme Scilab SCSS Self Shell Smalltalk Smarty SQL Standard%ML SuperCollider Tcl Tcsh Tea TeX Textile Turing -Twig Vala Verilog VHDL VimL Visual%Basic XML XQuery XS YAML" +Twig Vala Verilog VHDL VimL Visual%Basic XML XQuery XS YAML Auto" LANGUAGE_VALUES_gists="as adb cls scpt arc ino asp asm aug ahk bat befunge bmx boo b bro c cs cpp chs ck clj cmake c-objdump coffee cfm lisp v cppobjdump css feature pyx d darcspatch dart dasm16 pas diff d-objdump dylan ec epj e ex el erl @@ -94,14 +94,16 @@ mak mako md matlab mxt minid duby moo mu myt n nim nu numpy objdump m j ml ooc opa cl p parrot pasm pir pl aw txt ps1 pl pp pd py pytb r rkt raw r cw rst rhtml rb rs sage sass scala scm sci scss self sh st tpl sql sml sc tcl tcsh tea tex -textile t twig vala v vhd vim vb xml xq xs yml" -REGEX_URL_gists='s|^.*"html_url": "\([^"]\+\)".*$|\1|p' -REGEX_RAW_gists='s|^\(https://\)\(gist\)\(.github.com/\)\(.*\)$|\1raw\3\2/\4|' +textile t twig vala v vhd vim vb xml xq xs yml auto" +DEFAULT_LANGUAGE_gists="Auto" +REGEX_URL_gists='s|^.*"html_url": "\([^"]\+gist[^"]\+\)".*$|\1|p' +REGEX_RAW_gists='s|^\(https://gist.github.com\)\(/.*\)$|\1/raw\2|' escape_description_gists() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } escape_input_gists() { sed -e 's|\\|\\\\|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' -e 's|\t|\\t|g' -e 's|"|\\"|g' -e 's|$|\\n|' <<< "$*" | tr -d '\n'; } json_gists() { local description="${1}" language="${2}" content="${3}" - echo "{\"description\":\"${description}\",\"public\":\"true\",\"files\":{\"${description//\/}.${language}\":{\"content\":\"${content}\"}}" + [[ "$language" = auto ]] && language="" || language=".$language" + echo "{\"description\":\"${description}\",\"public\":\"true\",\"files\":{\"${description//\/}${language}\":{\"content\":\"${content}\"}}" } # lodgeit LANGUAGES_lodgeit="ABAP ActionScript ActionScript%3 Ada ANTLR ANTLR%With%ActionScript%Target \ @@ -140,7 +142,7 @@ rbcon splus sass scala scheme smalltalk smarty sql sqlite3 squidconf tcl tcsh tex diff vala vb.net \ vim xml xml+cheetah xml+django xml+evoque xml+mako xml+myghty xml+php xml+erb xml+smarty xslt yaml" POST_lodgeit="submit=Paste! % % language % % code" -REGEX_RAW_lodgeit='s|^\(http://[^/]*/\)show\(/[0-9]*/\)$|\1raw\2|' +REGEX_RAW_lodgeit='s|^\(http://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|' ### errors die() { @@ -170,6 +172,15 @@ ### conversions +# make comparison of specified languages and expirations case-insensitive +tolower() { + tr '[:upper:]' '[:lower:]' <<< "$*" +} + +compare_tolower() { + [[ $(tolower "$1") == $(tolower "$2") ]] +} + # escape % (used for escaping), & (used as separator in POST data), + (used as space in POST data), space and ; escape() { sed -e 's|%|%25|g' -e 's|&|%26|g' -e 's|+|%2b|g' -e 's|;|%3b|g' -e 's| |+|g' <<< "$*" || die "sed failed" @@ -192,7 +203,7 @@ ### verification verifyservice() { for s in $SERVICES; do - [[ $s == $* ]] && return 0 + compare_tolower "$s" "$*" && return 0 done echo "\"$*\" is not a supported service.$N" >&2 showservices >&2 @@ -207,7 +218,7 @@ if [[ -n ${!lang} ]]; then ((i=0)) for l in ${!lang}; do - if [[ $LANGUAGE == ${l//\%/ } ]]; then + if compare_tolower "$LANGUAGE" "${l//\%/ }"; then if [[ -n ${!count} ]]; then ((LANGUAGE=i+1)) elif [[ -n ${!values} ]]; then @@ -244,7 +255,7 @@ if [[ -n ${!expiration} ]]; then ((i=0)) for e in ${!expiration}; do - if [[ ${EXPIRATION} == ${e//\%/ } ]]; then + if compare_tolower "${EXPIRATION}" "${e//\%/ }"; then if [[ -n ${!count} ]]; then ((EXPIRATION=i+1)) elif [[ -n {!values} ]]; then @@ -355,6 +366,10 @@ Defaults (DEFAULT_{NICK,LANGUAGE,EXPIRATION}[_\${SERVICE}] and DEFAULT_SERVICE) can be overridden globally in /etc/wgetpaste.conf or /etc/wgetpaste.d/*.conf or per user in any of ~/.wgetpaste.conf or ~/.wgetpaste.d/*.conf. + +An additional http header can be passed by setting HEADER_\${SERVICE} in any of the +configuration files mentioned above. For example, authenticating with github gist: +HEADER_gists="Authorization: token 1234abc56789..." EOF } @@ -644,7 +659,7 @@ echo "The config files for wgetpaste have changed to *.conf.$N" >&2 deprecated=0 fi - echo "Please move ${f} to ${f/%.bash/.conf}" >&2 + echo "Please move ${f} to ${f%.bash}.conf" >&2 source "$f" || die "Failed to source $f" fi done @@ -845,12 +860,19 @@ WGETARGS="--post-data=$(postdata | sed -e 's|$|%0a|g' -e 's|\t|%09|g' | tr -d '\n')" fi + header="HEADER_$SERVICE" + if [[ -n "${!header}" ]]; then + WGETEXTRAHEADER="--header=${!header}" + else + WGETEXTRAHEADER="" + fi + # paste it WGETARGS="--tries=5 --timeout=60 $WGETARGS" if geturl needstdout || [[ $DEBUG || ! -w /dev/null ]]; then - OUTPUT=$(LC_ALL=C wget -O - $WGETARGS $RECIPIENT 2>&1) + OUTPUT=$(LC_ALL=C wget -O - $WGETARGS "$WGETEXTRAHEADER" $RECIPIENT 2>&1) else - OUTPUT=$(LC_ALL=C wget -O /dev/null $WGETARGS $RECIPIENT 2>&1) + OUTPUT=$(LC_ALL=C wget -O /dev/null $WGETARGS "$WGETEXTRAHEADER" $RECIPIENT 2>&1) fi # clean temporary file if it was created -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de