Hello community, here is the log from the commit of package wgetpaste for openSUSE:Factory checked in at 2020-09-10 22:52:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wgetpaste (Old) and /work/SRC/openSUSE:Factory/.wgetpaste.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wgetpaste" Thu Sep 10 22:52:58 2020 rev:8 rq:833390 version:2.30 Changes: -------- --- /work/SRC/openSUSE:Factory/wgetpaste/wgetpaste.changes 2018-02-18 11:45:29.626860274 +0100 +++ /work/SRC/openSUSE:Factory/.wgetpaste.new.4249/wgetpaste.changes 2020-09-10 22:55:17.228416050 +0200 @@ -1,0 +2,11 @@ +Thu Sep 10 06:25:10 UTC 2020 - Dirk Mueller <[email protected]> + +- update to 2.30: + * Fix raw URLs with dpaste + * License under MIT + * Fix handling of bpaste urls. + * Fallback location regex confusion fix + * dd support for gitlab snippets + * Hardcode 'v4' on the help message's gitlab URL + +------------------------------------------------------------------- Old: ---- wgetpaste-2.28.tar.bz2 New: ---- wgetpaste-2.30.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wgetpaste.spec ++++++ --- /var/tmp/diff_new_pack.6AcMQ7/_old 2020-09-10 22:55:17.652416671 +0200 +++ /var/tmp/diff_new_pack.6AcMQ7/_new 2020-09-10 22:55:17.656416676 +0200 @@ -1,7 +1,7 @@ # # spec file for package wgetpaste # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,24 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: wgetpaste -Version: 2.28 +Version: 2.30 Release: 0 Summary: Command-line interface to various pastebins -License: SUSE-Public-Domain +License: MIT Group: Productivity/Other -Url: http://wgetpaste.zlin.dk/ -Source0: http://wgetpaste.zlin.dk/%{name}-%{version}.tar.bz2 +URL: https://wgetpaste.zlin.dk/ +Source0: https://wgetpaste.zlin.dk/%{name}-%{version}.tar.bz2 Source1: services.conf Requires: bash Requires: coreutils Requires: wget Recommends: xclip -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description @@ -47,7 +46,7 @@ install -D -m 0644 _%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %files -%defattr(-,root,root,-) +%license LICENSE %dir %{_sysconfdir}/%{name}.d/ %dir %{_datadir}/zsh/site-functions/ %dir %{_datadir}/zsh/ ++++++ wgetpaste-2.28.tar.bz2 -> wgetpaste-2.30.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.28/LICENSE new/wgetpaste-2.30/LICENSE --- old/wgetpaste-2.28/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/wgetpaste-2.30/LICENSE 2020-07-31 23:56:05.000000000 +0200 @@ -0,0 +1,19 @@ +Copyright (c) 2007-2016 Bo Ørsted Andresen <[email protected]> + +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.28/wgetpaste new/wgetpaste-2.30/wgetpaste --- old/wgetpaste-2.28/wgetpaste 2016-07-18 21:57:28.000000000 +0200 +++ new/wgetpaste-2.30/wgetpaste 2020-07-31 23:56:05.000000000 +0200 @@ -2,9 +2,8 @@ # A Script that automates pasting to a number of pastebin services # relying only on bash, sed, coreutils (mktemp/sort/tr/wc/whoami/tee) and wget # Copyright (c) 2007-2016 Bo Ørsted Andresen <[email protected]> -# Distributed in the public domain. Do with it whatever you want. -VERSION="2.28" +VERSION="2.30" # don't inherit LANGUAGE from the env unset LANGUAGE @@ -14,7 +13,7 @@ N=$'\n' ### services -SERVICES="codepad bpaste dpaste gists poundpython" +SERVICES="codepad bpaste dpaste gists snippets" # bpaste ENGINE_bpaste=pinnwand URL_bpaste="https://bpaste.net/" @@ -33,13 +32,14 @@ # gists ENGINE_gists=gists URL_gists="https://api.github.com/gists" -# poundpython -ENGINE_poundpython=lodgeit -URL_poundpython="https://paste.pound-python.org/" # tinyurl ENGINE_tinyurl=tinyurl URL_tinyurl="http://tinyurl.com/ api-create.php" REGEX_RAW_tinyurl='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2|' +# snippets +ENGINE_snippets=snippets +URL_snippets="https://gitlab.com/api/v4/snippets" +ADDITIONAL_HEADERS_snippets=("Content-Type: application/json") ### engines # codepad @@ -55,7 +55,7 @@ EXPIRATIONS_dpaste="30%days 30%days%after%last%view" EXPIRATION_VALUES_dpaste="off on" POST_dpaste="submit=Paste+it poster title language hold % content" -REGEX_RAW_dpaste='s|^\(http://[^/]*/\)[^0-9]*\([0-9]*/\)$|\1\2plain/|' +REGEX_RAW_dpaste='s|^\(http://[^/]*/\)\([[:alnum:]]*\)$|\1\2.txt|' # gists LANGUAGES_gists="ActionScript Ada Apex AppleScript Arc Arduino ASP Assembly Augeas AutoHotkey Batchfile Befunge BlitzMax Boo Brainfuck Bro C C# C++ @@ -92,6 +92,15 @@ [[ "$language" = auto ]] && language="" || language=".$language" echo "{\"description\":\"${description}\",\"public\":\"${PUBLIC_gists}\",\"files\":{\"${description//\/}${language}\":{\"content\":\"${content}\"}}" } +# snippets +REGEX_URL_snippets='s|.*"web_url":"\([^"]*\)".*|\1|p' +REGEX_RAW_snippets='s|^\(.*/snippets\)\(/.*\)$|\1\2/raw|' +escape_description_snippets() { sed -e 's|"|\\"|g' -e 's|\x1b|\\u001b|g' -e 's|\r||g' <<< "$*"; } +escape_input_snippets() { 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_snippets() { + local description="${1}" content="${3}" + echo "{\"title\": \"${description}\", \"content\": \"${content}\", \"description\": \"${description}\", \"file_name\": \"${description}\", \"visibility\": \"${VISIBILITY_snippets}\" }" +} # lodgeit LANGUAGES_lodgeit="ABAP ActionScript ActionScript%3 Ada ANTLR ANTLR%With%ActionScript%Target \ ANTLR%With%CPP%Target ANTLR%With%C#%Target ANTLR%With%Java%Target ANTLR%With%ObjectiveC%Target \ @@ -185,7 +194,8 @@ xml+velocity xml xquery xslt xtend yaml" EXPIRATIONS_pinnwand="1day 1week 1month never" POST_pinnwand="submit=Paste! % % lexer expiry % code" -REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\?\)$|\1raw\2|' +REGEX_LOC_pinnwand="\(/show/[^ ]*\).*$|https://bpaste.net\1" +REGEX_RAW_pinnwand='s|^\(https\?://[^/]*/\)show\(/[^ ]*/\?\)$|\1raw\2|' ### errors die() { @@ -412,10 +422,15 @@ 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..." +HEADER_gists="Authorization: token 1234abc56789...", or with gitlab snippets: +HEADER_snippets="PRIVATE-TOKEN: 1234abc56789..." + +You can also set PUBLIC_gists='false' if you want to default to secret instead of +public github gists. In the case of gitlab, you can set VISIBILITY_snippets= to +'public', 'private' or 'internal'" -In the case of github gist you can also set PUBLIC_gists='false' if you want to -default to secret instead of public gists. +To change your gitlab server, you can override the default API URL setting +URL_snippets='https://gitlab.[server].com/api/v4/snippets' EOF } @@ -554,14 +569,19 @@ # get url from response from server geturl() { - local regex + local regex location regex=REGEX_URL_$ENGINE + location=REGEX_LOC_$ENGINE if [[ -n ${!regex} ]]; then [[ needstdout = $1 ]] && return 0 sed -n -e "${!regex}" <<< "$*" + elif [[ -n ${!location} ]]; then + [[ needstdout = $1 ]] && return 1 + sed -n -e "s|^.*Location: ${!location}|p" <<< "$*" else [[ needstdout = $1 ]] && return 1 - sed -n -e 's|^.*Location: \(https\{0,1\}://[^ ]*\).*$|\1|p' <<< "$*" + svc_url=URL_$SERVICE + sed -n -e "s|^.*Location: \\(${!svc_url}[^ ]*\\).*$|\\1|p" <<< "$*" fi | tail -n1 } @@ -722,7 +742,7 @@ load_configs [[ $SERVICESET ]] && verifyservice "$SERVICESET" && SERVICE=$(escape "$SERVICESET") DEFAULT_NICK=${DEFAULT_NICK:-$(whoami)} || die "whoami failed" -DEFAULT_SERVICE=${DEFAULT_SERVICE:-poundpython} +DEFAULT_SERVICE=${DEFAULT_SERVICE:-dpaste} DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-Plain Text} DEFAULT_EXPIRATION=${DEFAULT_EXPIRATION:-1 month} SERVICE=${SERVICE:-${DEFAULT_SERVICE}} @@ -738,6 +758,9 @@ PUBLIC_gists=${PUBLIC_gists:-true} [[ "${PUBLIC_gists}" = "true" || "${PUBLIC_gists}" = "false" ]] || die "Invalid setting for PUBLIC_gists. Can either be 'true' or 'false' not '${PUBLIC_gists}'" +VISIBILITY_snippets=${VISIBILITY_snippets:-public} +[[ "${VISIBILITY_snippets}" = "public" || "${VISIBILITY_snippets}" = "private" || "${VISIBILITY_snippets}" = "internal" ]] || die "Invalid setting for VISIBILITY_snippets. Can either be 'public', 'private' or 'internal' not '${VISIBILITY_snippets}'" + INFO_COMMAND=${INFO_COMMAND:-"emerge --info"} INFO_ARGS=${INFO_ARGS:-"--ignore-default-opts"} @@ -917,12 +940,23 @@ WGETEXTRAHEADER="" fi + # build additional headers + additional_headers="ADDITIONAL_HEADERS_$SERVICE" + WGETADDITIONALHEADERS=() + if [[ -n "${!additional_headers}" ]]; then + tmp=$additional_headers[@] + for i in "${!tmp}" + do + WGETADDITIONALHEADERS+=("--header=${i}") + done + fi + # paste it WGETARGS="--tries=5 --timeout=60 $WGETARGS" if geturl needstdout ; then - OUTPUT=$(LC_ALL=C wget -O - $WGETARGS ${WGETEXTRAHEADER:+"$WGETEXTRAHEADER"} $RECIPIENT 2>&1) + OUTPUT=$(LC_ALL=C wget -O - $WGETARGS ${WGETEXTRAHEADER:+"$WGETEXTRAHEADER"} ${WGETADDITIONALHEADERS[@]:+"${WGETADDITIONALHEADERS[@]}"} $RECIPIENT 2>&1) else - OUTPUT=$(LC_ALL=C wget -O /dev/null $WGETARGS ${WGETEXTRAHEADER:+"$WGETEXTRAHEADER"} $RECIPIENT 2>&1) + OUTPUT=$(LC_ALL=C wget -O /dev/null $WGETARGS ${WGETEXTRAHEADER:+"$WGETEXTRAHEADER"} ${WGETADDITIONALHEADERS[@]:+"${WGETADDITIONALHEADERS[@]}"} $RECIPIENT 2>&1) fi # clean temporary file if it was created diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.28/wgetpaste.spec new/wgetpaste-2.30/wgetpaste.spec --- old/wgetpaste-2.28/wgetpaste.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/wgetpaste-2.30/wgetpaste.spec 2020-08-19 16:01:43.000000000 +0200 @@ -0,0 +1,39 @@ +Name: wgetpaste +Version: 2.30 +Release: 1%{?dist} +Summary: Command-line interface to various paste-bins + +License: MIT +URL: http://%{name}.zlin.dk/ +Source0: %{url}/%{name}-%{version}.tar.bz2 + +Requires: bash sed wget + +BuildArch: noarch + +%description +Command-line interface to various paste-bins + +%prep +%setup -q + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p %{buildroot}/%{_bindir} + +install -m 0755 %{name} %{buildroot}/%{_bindir}/%{name} +sed -i -e "s:/usr/bin/env bash:/bin/bash:" %{buildroot}/%{_bindir}/%{name} + +%files +%{_bindir}/%{name} +%license LICENSE + + +%changelog +* Tue Oct 1 2019 Wulf C. Krueger <[email protected]> 2.29-1 +- Update to 2.29 + +* Wed Mar 21 2018 Wulf C. Krueger <[email protected]> 2.28-1 +- Initial package
