Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wgetpaste for openSUSE:Factory checked in at 2024-03-17 22:16:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wgetpaste (Old) and /work/SRC/openSUSE:Factory/.wgetpaste.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wgetpaste" Sun Mar 17 22:16:49 2024 rev:11 rq:1158736 version:2.34 Changes: -------- --- /work/SRC/openSUSE:Factory/wgetpaste/wgetpaste.changes 2022-12-03 10:04:15.459447385 +0100 +++ /work/SRC/openSUSE:Factory/.wgetpaste.new.1905/wgetpaste.changes 2024-03-17 22:17:56.212655723 +0100 @@ -1,0 +2,13 @@ +Sun Mar 17 11:53:57 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 2.34: + * Respect TMPDIR + * Update actions rules + * Disable sprunge + * Add paste.gentoo.zip + * Arg parse priority + -A/--ansi arg + * Added --quiet flag + * fix gists raw url + * fix typo and formatting + +------------------------------------------------------------------- Old: ---- wgetpaste-2.33.tar.xz wgetpaste-2.33.tar.xz.sig New: ---- wgetpaste-2.34.tar.xz wgetpaste-2.34.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wgetpaste.spec ++++++ --- /var/tmp/diff_new_pack.0nxvE4/_old 2024-03-17 22:17:56.872680006 +0100 +++ /var/tmp/diff_new_pack.0nxvE4/_new 2024-03-17 22:17:56.872680006 +0100 @@ -1,7 +1,7 @@ # # spec file for package wgetpaste # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: wgetpaste -Version: 2.33 +Version: 2.34 Release: 0 Summary: Command-line interface to various pastebins License: MIT ++++++ wgetpaste-2.33.tar.xz -> wgetpaste-2.34.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/.github/workflows/run_test.yml new/wgetpaste-2.34/.github/workflows/run_test.yml --- old/wgetpaste-2.33/.github/workflows/run_test.yml 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/.github/workflows/run_test.yml 2024-03-11 23:23:53.000000000 +0100 @@ -1,19 +1,18 @@ name: 'wgetpaste test runner' -on: [push] +on: [pull_request, push] jobs: run-test: name: 'Run test/test.sh' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: test/test.sh shell: bash run-test-ansi: name: 'Run test/test_ansi.sh' - # 22.04 is the earliest version that has ansifilter in the repos - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: 'Install ansifilter' run: | sudo apt-get update diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/_wgetpaste new/wgetpaste-2.34/_wgetpaste --- old/wgetpaste-2.33/_wgetpaste 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/_wgetpaste 2024-03-11 23:23:53.000000000 +0100 @@ -50,6 +50,7 @@ '(--xclippaste -C)'{--xclippaste,-C}'[write resulting url to the X clipboard selection buffer]' \ '(--raw -r)'{--raw,-r}'[show url for the raw paste]' \ '(--tee -t)'{--tee,-t}'[use tee to show what is being pasted]' \ + '(--quiet -q)'{--quiet,-q}'[show the url only]' \ '(--verbose -v)'{--verbose,-v}'[show wget stderr output if no url is received]' \ '--debug[be very verbose]' \ '(--help -h)'{--help,-h}'[show help and exit]' \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/test/test.sh new/wgetpaste-2.34/test/test.sh --- old/wgetpaste-2.33/test/test.sh 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/test/test.sh 2024-03-11 23:23:53.000000000 +0100 @@ -1,13 +1,13 @@ -#! /bin/bash +#!/usr/bin/env bash # wgetpaste test script # Exit code: number of mismatched downloads or 1 for general failure -# Copyright (C) 2021 xxc3nsoredxx +# Copyright (C) 2021-2022 Oskari Pirhonen <xxc3ncore...@gmail.com> # Don't assume the test is being run from the same directory as the script TEST_DIR="$(dirname "$0")" TEST_FILE="$TEST_DIR/test.txt" -DL_DIR="$(mktemp -q -d /tmp/wgetpaste_test.XXXXX)" +DL_DIR="$(mktemp -q --tmpdir -d wgetpaste_test.XXXXX)" # Services to hard skip # Pre-declare as map to maintain type even if empty # key -> value := service -> reason diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/test/test_ansi.sh new/wgetpaste-2.34/test/test_ansi.sh --- old/wgetpaste-2.33/test/test_ansi.sh 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/test/test_ansi.sh 2024-03-11 23:23:53.000000000 +0100 @@ -1,15 +1,15 @@ -#! /bin/bash +#!/usr/bin/env bash # wgetpaste test script (stripping ANSI codes) # Based on test/test.sh # Exit code: number of mismatched downloads or 1 for general failure -# Copyright (C) 2022 Oskari Pirhonen <xxc3ncore...@gmail.com> +# Copyright (C) 2022 Oskari Pirhonen <xxc3ncore...@gmail.com> # Don't assume the test is being run from the same directory as the script TEST_DIR="$(dirname "$0")" ANSI_FILE="$TEST_DIR/red.txt" NOANSI_FILE="$TEST_DIR/red_no_ansi.txt" -DL_DIR="$(mktemp -q -d /tmp/wgetpaste_test_ansi.XXXXX)" +DL_DIR="$(mktemp -q --tmpdir -d wgetpaste_test_ansi.XXXXX)" # Services to hard skip # Pre-declare as map to maintain type even if empty # key -> value := service -> reason @@ -94,8 +94,8 @@ # Paste stuff. Use a short timeout between requests (we're friendly after all!) sleep 1 -echo -n "Pasting command output (cat): " -ERROR_LOG="$DL_DIR/command-error.log" +echo -n "Pasting command output with ANSI stripping (cat): " +ERROR_LOG="$DL_DIR/command-noansi-error.log" URL="$("$TEST_DIR"/../wgetpaste -N -r -s "$WORKING" -v -c "cat $ANSI_FILE" 2>"$ERROR_LOG")" if [ $? -ne 0 ]; then echo "FAILED!" @@ -104,7 +104,7 @@ echo "SUCCESS!" echo -n "Downloading: " - if ! (wget -q "$URL" -O "$DL_DIR/command.txt" 2>>"$ERROR_LOG"); then + if ! (wget -q "$URL" -O "$DL_DIR/command-noansi.txt" 2>>"$ERROR_LOG"); then echo "FAILED!" FAILED_PASTE=$((FAILED_PASTE + 1)) else @@ -112,13 +112,35 @@ rm "$ERROR_LOG" echo "Removing 'command run' header" - sed -i -e '1d' "$DL_DIR/command.txt" + sed -i -e '1d' "$DL_DIR/command-noansi.txt" + fi +fi +sleep 1 +echo -n "Pasting command output without ANSI stripping (cat): " +ERROR_LOG="$DL_DIR/command-ansi-error.log" +URL="$("$TEST_DIR"/../wgetpaste -A -r -s "$WORKING" -v -c "cat $ANSI_FILE" 2>"$ERROR_LOG")" +if [ $? -ne 0 ]; then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) +else + echo "SUCCESS!" + + echo -n "Downloading: " + if ! (wget -q "$URL" -O "$DL_DIR/command-ansi.txt" 2>>"$ERROR_LOG"); then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) + else + echo "SUCCESS" + rm "$ERROR_LOG" + + echo "Removing 'command run' header" + sed -i -e '1d' "$DL_DIR/command-ansi.txt" fi fi sleep 1 -echo -n "Pasting stdin (cat | wgetpaste): " -ERROR_LOG="$DL_DIR/stdin-error.log" +echo -n "Pasting stdin with ANSI stripping (cat | wgetpaste): " +ERROR_LOG="$DL_DIR/stdin-noansi-error.log" URL="$(cat "$ANSI_FILE" | "$TEST_DIR"/../wgetpaste -N -r -s "$WORKING" -v 2>"$ERROR_LOG")" if [ $? -ne 0 ]; then echo "FAILED!" @@ -127,7 +149,26 @@ echo "SUCCESS!" echo -n "Downloading: " - if ! (wget -q "$URL" -O "$DL_DIR/stdin.txt" 2>>"$ERROR_LOG"); then + if ! (wget -q "$URL" -O "$DL_DIR/stdin-noansi.txt" 2>>"$ERROR_LOG"); then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) + else + echo "SUCCESS!" + rm "$ERROR_LOG" + fi +fi +sleep 1 +echo -n "Pasting stdin without ANSI stripping (cat | wgetpaste): " +ERROR_LOG="$DL_DIR/stdin-ansi-error.log" +URL="$(cat "$ANSI_FILE" | "$TEST_DIR"/../wgetpaste -A -r -s "$WORKING" -v 2>"$ERROR_LOG")" +if [ $? -ne 0 ]; then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) +else + echo "SUCCESS!" + + echo -n "Downloading: " + if ! (wget -q "$URL" -O "$DL_DIR/stdin-ansi.txt" 2>>"$ERROR_LOG"); then echo "FAILED!" FAILED_PASTE=$((FAILED_PASTE + 1)) else @@ -137,8 +178,8 @@ fi sleep 1 -echo -n "Pasting a file: " -ERROR_LOG="$DL_DIR/file-error.log" +echo -n "Pasting a file with ANSI stripping: " +ERROR_LOG="$DL_DIR/file-noansi-error.log" URL="$("$TEST_DIR"/../wgetpaste -N -r -s "$WORKING" -v "$ANSI_FILE" 2>"$ERROR_LOG")" if [ $? -ne 0 ]; then echo "FAILED!" @@ -147,7 +188,26 @@ echo "SUCCESS!" echo -n "Downloading: " - if ! (wget -q "$URL" -O "$DL_DIR/file.txt" 2>>"$ERROR_LOG"); then + if ! (wget -q "$URL" -O "$DL_DIR/file-noansi.txt" 2>>"$ERROR_LOG"); then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) + else + echo "SUCCESS!" + rm "$ERROR_LOG" + fi +fi +sleep 1 +echo -n "Pasting a file without ANSI stripping: " +ERROR_LOG="$DL_DIR/file-ansi-error.log" +URL="$("$TEST_DIR"/../wgetpaste -A -r -s "$WORKING" -v "$ANSI_FILE" 2>"$ERROR_LOG")" +if [ $? -ne 0 ]; then + echo "FAILED!" + FAILED_PASTE=$((FAILED_PASTE + 1)) +else + echo "SUCCESS!" + + echo -n "Downloading: " + if ! (wget -q "$URL" -O "$DL_DIR/file-ansi.txt" 2>>"$ERROR_LOG"); then echo "FAILED!" FAILED_PASTE=$((FAILED_PASTE + 1)) else @@ -157,13 +217,23 @@ fi # Compare downloaded files -for dl_file in "$DL_DIR"/*.txt; do +for dl_file in "$DL_DIR"/*-noansi.txt; do echo -n "Testing file $dl_file: " # Ignore missing trailing newline and extra empty lines in downloaded file if (diff -q -Z -B "$NOANSI_FILE" "$dl_file" &>/dev/null); then echo "SUCCESS!" else echo "FAILED!" + DL_MISMATCH=$((DL_MISMATCH + 1)) + fi +done +for dl_file in "$DL_DIR"/*-ansi.txt; do + echo -n "Testing file $dl_file: " + # Ignore missing trailing newline and extra empty lines in downloaded file + if (diff -q -Z -B "$ANSI_FILE" "$dl_file" &>/dev/null); then + echo "SUCCESS!" + else + echo "FAILED!" DL_MISMATCH=$((DL_MISMATCH + 1)) fi done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/wgetpaste new/wgetpaste-2.34/wgetpaste --- old/wgetpaste-2.33/wgetpaste 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/wgetpaste 2024-03-11 23:23:53.000000000 +0100 @@ -3,7 +3,7 @@ # relying only on bash, sed, coreutils (mktemp/sort/tr/wc/whoami/tee) and wget # Copyright (c) 2007-2016 Bo Ãrsted Andresen <bo.andre...@zlin.dk> -VERSION="2.33" +VERSION="2.34" # don't inherit LANGUAGE from the env unset LANGUAGE @@ -41,7 +41,7 @@ } ### services -SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets sprunge" +SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets" # 0x0 ENGINE_0x0=0x0 URL_0x0="http://0x0.st" @@ -68,6 +68,10 @@ ENGINE_ix_io=ix_io URL_ix_io="http://ix.io" SIZE_ix_io="1000000 1%MB" +# paste.gentoo.zip +ENGINE_pgz=pgz +URL_pgz="https://paste.gentoo.zip" +SIZE_pgz="2000000 2%MB" # snippets ENGINE_snippets=snippets URL_snippets="https://gitlab.com/api/v4/snippets" @@ -139,7 +143,6 @@ } REGEX_RAW_dpaste='s|^http.*|\0.txt|' REGEX_URL_dpaste='s|^http.*|\0|p' - # gists LANGUAGES_gists="ActionScript Ada Apex AppleScript Arc Arduino ASP Assembly Augeas AutoHotkey Batchfile Befunge BlitzMax Boo Brainfuck Bro C C# C++ @@ -168,7 +171,7 @@ 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|' +REGEX_RAW_gists='s|^\(https://gist.github.com\)\(/.*\)$|\1\2/raw|' 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'; } POST_gists() { @@ -230,6 +233,20 @@ POST_generic "submit=Paste! % % language % % code" "$1" "$2" "$3" "$4" "$5" "$6" } REGEX_RAW_lodgeit='s|^\(https\?://[^/]*/\)show\(/[[:alnum:]]*/\)$|\1raw\2|' +# paste.gentoo.zip +escape_input_pgz() { echo "$*"; } +POST_pgz() { + local content="${6}" + local boundary="WGETPASTE-3d8dfd9bff2b12a7410328d2ec1ed145" + echo "--${boundary}" + echo "Content-Disposition: form-data; name=\"file\"" + echo "" + echo "${content}" + echo "--${boundary}--" + ADDITIONAL_HEADERS_pgz=("Content-Type: multipart/form-data; boundary=${boundary}") +} +REGEX_RAW_pgz='s|^http.*|\0|' +REGEX_URL_pgz='s|^http.*|\0|p' # 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 \ @@ -539,9 +556,12 @@ -X, --xpaste write resulting url to the X primary selection buffer (requires x11-misc/xclip) -C, --xclippaste write resulting url to the X clipboard selection buffer (requires x11-misc/xclip) -N, --no-ansi strip ANSI codes such as colors before pasting (requires app-text/ansifilter) + -A, --ansi don't strip ANSI codes + (useful for undoing NOANSI specified in a config file) -r, --raw show url for the raw paste (no syntax highlighting or html) -t, --tee use tee to show what is being pasted + -q, --quiet show the url only -v, --verbose show wget stderr output if no url is received --completions emit output suitable for shell completions (only affects --list-*) --debug be *very* verbose (implies -v) @@ -580,7 +600,7 @@ done exit 0 fi - echo "Services supported: (case sensitive):" + echo "Services supported (case sensitive):" max=4 for s in $SERVICES; do [[ ${#s} -gt $max ]] && max=${#s} @@ -594,9 +614,9 @@ [[ ${#s} -gt $max ]] && max=${#s} done ((INDV=3+max+IND)) - engine=" $E[${INDV}G| Pastebin engine:" + engine=" $E[${INDV}G| Pastebin engine" fi - echo " Name: $E[${IND}G| Url:$engine" + echo " Name $E[${IND}G| URL$engine" echo -ne " "; for((s=3;s<${INDV:-${IND}}+17;s++)); do (( $s == IND-1 || $s == INDV-1 )) && echo -ne "|" || echo -ne "="; done; echo for s in $SERVICES; do [[ $s = $DEFAULT_SERVICE ]] && d="*" || d=" " @@ -640,7 +660,7 @@ } showurl() { - echo -n "Your ${2}paste can be seen here: " >&2 + [[ $QUIET ]] || echo -n "Your ${2}paste can be seen here: " >&2 echo "$1" [[ $XPASTE ]] && x_paste "$1" primary [[ $XCLIPPASTE ]] && x_paste "$1" clipboard @@ -703,7 +723,32 @@ fi | tail -n1 } -### read cli options +# read the config files +load_configs() { + if [[ ! $IGNORECONFIGS ]]; then + # compatibility code + local f deprecated= + for f in {/etc/,~/.}wgetpaste{.d/*.bash,}; do + if [[ -f $f ]]; then + if [[ -z $deprecated ]]; then + echo "The config files for wgetpaste have changed to *.conf.$N" >&2 + deprecated=0 + fi + echo "Please move ${f} to ${f%.bash}.conf" >&2 + source "$f" || die "Failed to source $f" + fi + done + [[ -n $deprecated ]] && echo >&2 + # new locations override old ones in case they collide + for f in {/etc/,~/.}wgetpaste{.d/*,}.conf; do + if [[ -f $f ]]; then + source "$f" || die "Failed to source $f" + fi + done + fi +} + +### get runtime options # separate groups of short options. replace --foo=bar with --foo bar while [[ -n $1 ]]; do @@ -739,12 +784,17 @@ # set the separated options as input options. set -- "${ARGS[@]}" +load_configs + while [[ -n $1 ]]; do ((args=1)) case "$1" in -- ) shift && getfilenames "$@" && break ;; + -A | --ansi ) + NOANSI= + ;; -c | --command ) requiredarg "$@" SOURCE="command" @@ -792,6 +842,9 @@ -N | --no-ansi ) NOANSI=0 ;; + -q | --quiet) + QUIET=0 + ;; -r | --raw ) RAW=0 ;; @@ -842,30 +895,6 @@ fi ### defaults -load_configs() { - if [[ ! $IGNORECONFIGS ]]; then - # compatibility code - local f deprecated= - for f in {/etc/,~/.}wgetpaste{.d/*.bash,}; do - if [[ -f $f ]]; then - if [[ -z $deprecated ]]; then - echo "The config files for wgetpaste have changed to *.conf.$N" >&2 - deprecated=0 - fi - echo "Please move ${f} to ${f%.bash}.conf" >&2 - source "$f" || die "Failed to source $f" - fi - done - [[ -n $deprecated ]] && echo >&2 - # new locations override old ones in case they collide - for f in {/etc/,~/.}wgetpaste{.d/*,}.conf; do - if [[ -f $f ]]; then - source "$f" || die "Failed to source $f" - fi - done - fi -} -load_configs [[ $SERVICESET ]] && verifyservice "$SERVICESET" && SERVICE=$(escape "$SERVICESET") DEFAULT_NICK=${DEFAULT_NICK:-$(whoami)} || die "whoami failed" DEFAULT_SERVICE=${DEFAULT_SERVICE:-bpaste} @@ -945,7 +974,7 @@ # create tmpfile for use with tee if [[ $TEE ]]; then - TMPF=$(mktemp /tmp/wgetpaste.XXXXXX) + TMPF=$(mktemp -q --tmpdir wgetpaste.XXXXXX) [[ -f $TMPF ]] || die "Could not create a temporary file for use with tee." fi @@ -1049,7 +1078,7 @@ else # create temp file (wget is much more reliable reading # large input via --post-file rather than --post-data) - [[ -f $TMPF ]] || TMPF=$(mktemp /tmp/wgetpaste.XXXXXX) + [[ -f $TMPF ]] || TMPF=$(mktemp -q --tmpdir wgetpaste.XXXXXX) if [[ -f $TMPF ]]; then postdata > "$TMPF" || die "Failed to write to temporary file: \"$TMPF\"." WGETARGS="--post-file=$TMPF" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wgetpaste-2.33/wgetpaste.spec new/wgetpaste-2.34/wgetpaste.spec --- old/wgetpaste-2.33/wgetpaste.spec 2022-11-21 22:19:47.000000000 +0100 +++ new/wgetpaste-2.34/wgetpaste.spec 2024-03-11 23:23:53.000000000 +0100 @@ -1,5 +1,5 @@ Name: wgetpaste -Version: 2.33 +Version: 2.34 Release: 1%{?dist} Summary: Command-line interface to various paste-bins