public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2019-02-23 16:54 Ben Kohler
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Kohler @ 2019-02-23 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     d802bb779450a130c5275a9d3897fe46d2fcda97
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 23 16:54:18 2019 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Sat Feb 23 16:54:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d802bb77

Revert "app-text/wgetpaste: revbump to work around broken default service"

This reverts commit 085038f1e996bdbb0502ef0b222a4e3cb0c83cb4.

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../wgetpaste-2.28-remove-broken-services.patch    | 20 ---------------
 app-text/wgetpaste/wgetpaste-2.28-r2.ebuild        | 29 ----------------------
 2 files changed, 49 deletions(-)

diff --git a/app-text/wgetpaste/files/wgetpaste-2.28-remove-broken-services.patch b/app-text/wgetpaste/files/wgetpaste-2.28-remove-broken-services.patch
deleted file mode 100644
index f648a6d15eb..00000000000
--- a/app-text/wgetpaste/files/wgetpaste-2.28-remove-broken-services.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/wgetpaste	2019-02-22 09:16:47.016742824 +0100
-+++ a/wgetpaste	2019-02-22 09:21:05.049530136 +0100
-@@ -14,7 +14,7 @@ E=$'\e'
- N=$'\n'
- 
- ### services
--SERVICES="codepad bpaste dpaste gists poundpython"
-+SERVICES="bpaste dpaste"
- # bpaste
- ENGINE_bpaste=pinnwand
- URL_bpaste="https://bpaste.net/"
-@@ -722,7 +722,7 @@ load_configs() {
- 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:-bpaste}
- DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-Plain Text}
- DEFAULT_EXPIRATION=${DEFAULT_EXPIRATION:-1 month}
- SERVICE=${SERVICE:-${DEFAULT_SERVICE}}

diff --git a/app-text/wgetpaste/wgetpaste-2.28-r2.ebuild b/app-text/wgetpaste/wgetpaste-2.28-r2.ebuild
deleted file mode 100644
index bae4fd9c2dc..00000000000
--- a/app-text/wgetpaste/wgetpaste-2.28-r2.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-DESCRIPTION="Command-line interface to various pastebins"
-HOMEPAGE="http://wgetpaste.zlin.dk/"
-SRC_URI="http://wgetpaste.zlin.dk/${P}.tar.bz2"
-
-LICENSE="public-domain"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
-IUSE="+ssl"
-
-DEPEND=""
-RDEPEND="net-misc/wget[ssl?]"
-
-PATCHES=( "${FILESDIR}"/wgetpaste-2.28-remove-broken-services.patch )
-
-src_prepare() {
-	sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
-	default
-}
-
-src_install() {
-	dobin ${PN}
-	insinto /usr/share/zsh/site-functions
-	doins _wgetpaste
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2022-11-22  1:33 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-11-22  1:33 UTC (permalink / raw
  To: gentoo-commits

commit:     0305ea926d6107adb5d9f432dca9614903481ce1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 01:23:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 01:33:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0305ea92

app-text/wgetpaste: add 2.33

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/wgetpaste/Manifest                        |  1 +
 .../wgetpaste/files/wgetpaste-2.33-tests.patch     | 83 ++++++++++++++++++++++
 app-text/wgetpaste/wgetpaste-2.33.ebuild           | 38 ++++++++++
 3 files changed, 122 insertions(+)

diff --git a/app-text/wgetpaste/Manifest b/app-text/wgetpaste/Manifest
index ded79d65d8d0..15e185e5b013 100644
--- a/app-text/wgetpaste/Manifest
+++ b/app-text/wgetpaste/Manifest
@@ -1,3 +1,4 @@
 DIST wgetpaste-2.29.tar.bz2 12988 BLAKE2B 838b84632754f6e07c25fe3648e14bf939dff4e08ae8e8064e94008beb436f77738e4f54859115321fbf445a323641ebfecf5fd7d09bbbb46c72e913687deb07 SHA512 6596842733bb5d1d52cbb3cbcf61ba714f0cbfdc13acb4d6025ccfd27c214adaf886ac3a0a11baefaa4af3f33165619e5a3360b4e0807d29e8dc8ef5ff819bb6
 DIST wgetpaste-2.30_p20210222.tar.gz 14654 BLAKE2B e74332826f7faec3c2be2dddfd5f81d1ec14aec92888f27cdcd081b59262ac742003f2f48af3c3ca25be9e02f583a37dd1bec315236ab54912ebf6cf61308a10 SHA512 467daff5531fd6361ade87913ab867f67f72d5ffc07a35c263cd3dad65774ed31b3a6b0d69d2b52726a24419758d784c23e8c587f23e9028afd0e0a27966f32f
 DIST wgetpaste-2.32.tar.gz 16626 BLAKE2B a8628a47edec5797f011fdf648cccf4147043bb699fe6ebfc38b66d1bbff1840147613e1de1a2abf1048b83247e9a16026bed4174be605f99e59035cf7c64f9f SHA512 57f6194c864adf3eabffe46163d1c83a5c2c30affc4c353fee5cafe6aaf19cfa306e134cb5dd216577eb34cc93eee66b28297e5a1d4fa92d78d38597170d40bb
+DIST wgetpaste-2.33.tar.xz 16408 BLAKE2B 78baebf4edb6e6340a73127099366d306359d02c0c1eab137822c56669da0609a5479940b4fb2accbc79978df091dcd34415876618e64aa556d1584f74773736 SHA512 9bf1f379316da372b4f69296b54f9a266dcf9fdaa2a8718165a2029571f4c2c0166304ffebeb2ec4657ea6f49087793f40d9da383f5da052bce0543c90ea13ab

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-tests.patch b/app-text/wgetpaste/files/wgetpaste-2.33-tests.patch
new file mode 100644
index 000000000000..41d0bece7962
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-tests.patch
@@ -0,0 +1,83 @@
+https://github.com/zlin/wgetpaste/pull/38
+
+From 3470bbe651c2264a7f985f3b86f67a6ff6d0c587 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 01:29:16 +0000
+Subject: [PATCH 1/3] test: respect TMPDIR in mktemp (pass --tmpdir)
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/test/test.sh
++++ b/test/test.sh
+@@ -7,7 +7,7 @@
+ # 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
+--- a/test/test_ansi.sh
++++ b/test/test_ansi.sh
+@@ -9,7 +9,7 @@
+ 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
+
+From 0c3cc1a5286c95a5bcd6408035f6c230350c1565 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 01:29:40 +0000
+Subject: [PATCH 2/3] test: use portable bash shebang
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/test/test.sh
++++ b/test/test.sh
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#!/usr/bin/env bash
+ 
+ # wgetpaste test script
+ # Exit code: number of mismatched downloads or 1 for general failure
+--- a/test/test_ansi.sh
++++ b/test/test_ansi.sh
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#!/usr/bin/env bash
+ 
+ # wgetpaste test script (stripping ANSI codes)
+ # Based on test/test.sh
+
+From 8d1cf7a8d0ce9ff21a8e1dc66169b04e4f8fc852 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 01:29:55 +0000
+Subject: [PATCH 3/3] test: normalise copyright header
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/test/test.sh
++++ b/test/test.sh
+@@ -2,7 +2,7 @@
+ 
+ # wgetpaste test script
+ # Exit code: number of mismatched downloads or 1 for general failure
+-# Copyright (C) 2021  xxc3nsoredxx
++# Copyright (C) 2022 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+ 
+ # Don't assume the test is being run from the same directory as the script
+ TEST_DIR="$(dirname "$0")"
+--- a/test/test_ansi.sh
++++ b/test/test_ansi.sh
+@@ -3,7 +3,7 @@
+ # 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 <xxc3ncoredxx@gmail.com>
++# Copyright (C) 2022 Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+ 
+ # Don't assume the test is being run from the same directory as the script
+ TEST_DIR="$(dirname "$0")"
+

diff --git a/app-text/wgetpaste/wgetpaste-2.33.ebuild b/app-text/wgetpaste/wgetpaste-2.33.ebuild
new file mode 100644
index 000000000000..f6662506f9ae
--- /dev/null
+++ b/app-text/wgetpaste/wgetpaste-2.33.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Command-line interface to various pastebins"
+HOMEPAGE="https://wgetpaste.zlin.dk/"
+SRC_URI="https://github.com/zlin/wgetpaste/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="+ssl"
+
+PROPERTIES="test_network"
+RESTRICT="test"
+
+RDEPEND="net-misc/wget[ssl?]"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.33-tests.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
+}
+
+src_test() {
+	test/test.sh || die
+}
+
+src_install() {
+	dobin ${PN}
+	insinto /usr/share/zsh/site-functions
+	doins _wgetpaste
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2023-10-19  9:26 Florian Schmaus
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Schmaus @ 2023-10-19  9:26 UTC (permalink / raw
  To: gentoo-commits

commit:     de1d2bf9997e280b14c0dd7028a1bb17115f8d20
Author:     Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com>
AuthorDate: Sun Oct 15 02:38:37 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 09:25:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de1d2bf9

app-text/wgetpaste: add paste.gentoo.zip

From https://github.com/zlin/wgetpaste/pull/48

Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33340
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../wgetpaste-2.33-add-paste-gentoo-zip.patch      | 69 ++++++++++++++++++++++
 ...ste-2.33-r2.ebuild => wgetpaste-2.33-r3.ebuild} |  1 +
 2 files changed, 70 insertions(+)

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-add-paste-gentoo-zip.patch b/app-text/wgetpaste/files/wgetpaste-2.33-add-paste-gentoo-zip.patch
new file mode 100644
index 000000000000..5b9fcc5f4618
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-add-paste-gentoo-zip.patch
@@ -0,0 +1,69 @@
+From cc41231b0ea2ec5cc0a8353fd4a9b6b71301f819 Mon Sep 17 00:00:00 2001
+From: Christopher Fore <csfore@posteo.net>
+Date: Sat, 14 Oct 2023 21:48:39 -0400
+Subject: [PATCH] Add new service - paste.gentoo.zip
+
+Specified in the code with `pgz` and in the cli for usage and brevity.
+---
+See also: https://github.com/zlin/wgetpaste/pull/48
+- Oskari
+
+ wgetpaste | 21 +++++++++++++++++++--
+ 1 file changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/wgetpaste b/wgetpaste
+index b3a537b..fc0b559 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -41,7 +41,7 @@ POST_generic() {
+ }
+ 
+ ### services
+-SERVICES="0x0 bpaste codepad dpaste gists ix_io snippets"
++SERVICES="0x0 bpaste codepad dpaste gists ix_io pgz snippets"
+ # 0x0
+ ENGINE_0x0=0x0
+ URL_0x0="http://0x0.st"
+@@ -68,6 +68,10 @@ URL_gists="https://api.github.com/gists"
+ 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 @@ POST_dpaste() {
+ }
+ 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++
+@@ -230,6 +233,20 @@ POST_lodgeit() {
+ 	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 \
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/wgetpaste-2.33-r2.ebuild b/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
similarity index 96%
rename from app-text/wgetpaste/wgetpaste-2.33-r2.ebuild
rename to app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
index d7840c31c259..89f63061351c 100644
--- a/app-text/wgetpaste/wgetpaste-2.33-r2.ebuild
+++ b/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
@@ -22,6 +22,7 @@ RDEPEND="net-misc/wget[ssl?]"
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.33-tests.patch
 	"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
+	"${FILESDIR}"/${PN}-2.33-add-paste-gentoo-zip.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2023-11-11 12:26 Yixun Lan
  0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2023-11-11 12:26 UTC (permalink / raw
  To: gentoo-commits

commit:     cc06acf6af6966565992c137bc843bcff54da812
Author:     Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com>
AuthorDate: Tue Nov  7 04:37:17 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 12:26:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc06acf6

app-text/wgetpaste: add -q/--quiet

Closes: https://github.com/gentoo/gentoo/pull/33702
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/wgetpaste-2.33-added-quiet-flag.patch    | 61 ++++++++++++++++++++++
 ...ste-2.33-r3.ebuild => wgetpaste-2.33-r4.ebuild} |  1 +
 2 files changed, 62 insertions(+)

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch b/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
new file mode 100644
index 000000000000..f8bac315d2f2
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
@@ -0,0 +1,61 @@
+From 75e68f79adaae7f50920e84a748b7ebb4a3a8a1d Mon Sep 17 00:00:00 2001
+From: Richard-Rogalski <rrogalski@tutanota.com>
+Date: Mon, 6 Nov 2023 14:00:02 -0600
+Subject: [PATCH] Added --quiet flag
+
+Signed-off-by: Richard Rogalski <rrogalski@firemail.cc>
+Closes: #19
+---
+See also: https://github.com/zlin/wgetpaste/pull/51
+- Oskari
+
+ _wgetpaste | 1 +
+ wgetpaste  | 6 +++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/_wgetpaste b/_wgetpaste
+index c4703e5..63696ad 100644
+--- a/_wgetpaste
++++ b/_wgetpaste
+@@ -50,6 +50,7 @@ _arguments -s : \
+   '(--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 --git a/wgetpaste b/wgetpaste
+index fc0b559..d016515 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -559,6 +559,7 @@ Options:
+ 
+     -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)
+@@ -657,7 +658,7 @@ showexpirations() {
+ }
+ 
+ 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
+@@ -809,6 +810,9 @@ while [[ -n $1 ]]; do
+ 		-N | --no-ansi )
+ 		NOANSI=0
+ 		;;
++		-q | --quiet)
++		QUIET=0
++		;;
+ 		-r | --raw )
+ 		RAW=0
+ 		;;
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild b/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
similarity index 96%
rename from app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
rename to app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
index 89f63061351c..4a7f3ee27a86 100644
--- a/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
+++ b/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.33-tests.patch
 	"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
 	"${FILESDIR}"/${PN}-2.33-add-paste-gentoo-zip.patch
+	"${FILESDIR}"/${PN}-2.33-added-quiet-flag.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2023-11-11 23:47 Yixun Lan
  0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2023-11-11 23:47 UTC (permalink / raw
  To: gentoo-commits

commit:     8541447825a8befd11222b84152fb1cfc0f17383
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 11 23:38:05 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 23:46:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85414478

app-text/wgetpaste: Revert "app-text/wgetpaste: add -q/--quiet"

the version isn't updated, should not been pushed
This reverts commit cc06acf6af6966565992c137bc843bcff54da812.

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/wgetpaste-2.33-added-quiet-flag.patch    | 61 ----------------------
 ...ste-2.33-r4.ebuild => wgetpaste-2.33-r3.ebuild} |  1 -
 2 files changed, 62 deletions(-)

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch b/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
deleted file mode 100644
index f8bac315d2f2..000000000000
--- a/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 75e68f79adaae7f50920e84a748b7ebb4a3a8a1d Mon Sep 17 00:00:00 2001
-From: Richard-Rogalski <rrogalski@tutanota.com>
-Date: Mon, 6 Nov 2023 14:00:02 -0600
-Subject: [PATCH] Added --quiet flag
-
-Signed-off-by: Richard Rogalski <rrogalski@firemail.cc>
-Closes: #19
----
-See also: https://github.com/zlin/wgetpaste/pull/51
-- Oskari
-
- _wgetpaste | 1 +
- wgetpaste  | 6 +++++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/_wgetpaste b/_wgetpaste
-index c4703e5..63696ad 100644
---- a/_wgetpaste
-+++ b/_wgetpaste
-@@ -50,6 +50,7 @@ _arguments -s : \
-   '(--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 --git a/wgetpaste b/wgetpaste
-index fc0b559..d016515 100755
---- a/wgetpaste
-+++ b/wgetpaste
-@@ -559,6 +559,7 @@ Options:
- 
-     -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)
-@@ -657,7 +658,7 @@ showexpirations() {
- }
- 
- 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
-@@ -809,6 +810,9 @@ while [[ -n $1 ]]; do
- 		-N | --no-ansi )
- 		NOANSI=0
- 		;;
-+		-q | --quiet)
-+		QUIET=0
-+		;;
- 		-r | --raw )
- 		RAW=0
- 		;;
--- 
-2.41.0
-

diff --git a/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild b/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
similarity index 96%
rename from app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
rename to app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
index 4a7f3ee27a86..89f63061351c 100644
--- a/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
+++ b/app-text/wgetpaste/wgetpaste-2.33-r3.ebuild
@@ -23,7 +23,6 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.33-tests.patch
 	"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
 	"${FILESDIR}"/${PN}-2.33-add-paste-gentoo-zip.patch
-	"${FILESDIR}"/${PN}-2.33-added-quiet-flag.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/
@ 2023-11-11 23:47 Yixun Lan
  0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2023-11-11 23:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b205329c101956d2c54a9204c8065c3389edd217
Author:     Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com>
AuthorDate: Tue Nov  7 04:37:17 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 23:46:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b205329c

app-text/wgetpaste: pull some stuff from upstream

- Add -A/--ansi arg to enable ANSI pasting (don't use ansifilter)
- Add -q/--quiet arg to suppress "Your paste ..." output

Closes: https://github.com/gentoo/gentoo/pull/33702
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 .../files/wgetpaste-2.33-add-A-ansi.patch          |  39 +++++
 .../files/wgetpaste-2.33-added-quiet-flag.patch    |  61 ++++++++
 ...getpaste-2.33-change-arg-parsing-priority.patch |  95 ++++++++++++
 ...etpaste-2.33-test_ansi-add-A-to-the-tests.patch | 171 +++++++++++++++++++++
 app-text/wgetpaste/wgetpaste-2.33-r4.ebuild        |  66 ++++++++
 5 files changed, 432 insertions(+)

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-add-A-ansi.patch b/app-text/wgetpaste/files/wgetpaste-2.33-add-A-ansi.patch
new file mode 100644
index 000000000000..e55c8192dac7
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-add-A-ansi.patch
@@ -0,0 +1,39 @@
+From 9614658e6a31bf1b318972008fd9fd1301e9d92f Mon Sep 17 00:00:00 2001
+From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+Date: Sun, 13 Aug 2023 14:32:34 -0500
+Subject: [PATCH 2/3] Add -A/--ansi
+
+Don't strip ANSI codes.
+---
+See also: https://github.com/zlin/wgetpaste/pull/46
+- Oskari
+
+ wgetpaste | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/wgetpaste b/wgetpaste
+index 5f4152d..1e3ae35 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -556,6 +556,8 @@ Options:
+     -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
+@@ -789,6 +791,9 @@ while [[ -n $1 ]]; do
+ 		-- )
+ 		shift && getfilenames "$@" && break
+ 		;;
++		-A | --ansi )
++		NOANSI=
++		;;
+ 		-c | --command )
+ 		requiredarg "$@"
+ 		SOURCE="command"
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch b/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
new file mode 100644
index 000000000000..b56322430364
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-added-quiet-flag.patch
@@ -0,0 +1,61 @@
+From fa0bd6dd8b7bc21b292e4f94eaa4fbf71d5240f1 Mon Sep 17 00:00:00 2001
+From: Richard-Rogalski <rrogalski@tutanota.com>
+Date: Mon, 6 Nov 2023 14:00:02 -0600
+Subject: [PATCH] Added --quiet flag
+
+Signed-off-by: Richard Rogalski <rrogalski@firemail.cc>
+Closes: #19
+---
+See also: https://github.com/zlin/wgetpaste/pull/51
+- Oskari
+
+ _wgetpaste | 1 +
+ wgetpaste  | 6 +++++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/_wgetpaste b/_wgetpaste
+index c4703e5..63696ad 100644
+--- a/_wgetpaste
++++ b/_wgetpaste
+@@ -50,6 +50,7 @@ _arguments -s : \
+   '(--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 --git a/wgetpaste b/wgetpaste
+index 1e3ae35..e38f9e5 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -561,6 +561,7 @@ Options:
+ 
+     -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)
+@@ -659,7 +660,7 @@ showexpirations() {
+ }
+ 
+ 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
+@@ -841,6 +842,9 @@ while [[ -n $1 ]]; do
+ 		-N | --no-ansi )
+ 		NOANSI=0
+ 		;;
++		-q | --quiet)
++		QUIET=0
++		;;
+ 		-r | --raw )
+ 		RAW=0
+ 		;;
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-change-arg-parsing-priority.patch b/app-text/wgetpaste/files/wgetpaste-2.33-change-arg-parsing-priority.patch
new file mode 100644
index 000000000000..144d622f1243
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-change-arg-parsing-priority.patch
@@ -0,0 +1,95 @@
+From cfe7dcd8a0e40b8c18556aad0b657f431c90505a Mon Sep 17 00:00:00 2001
+From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+Date: Sun, 13 Aug 2023 14:25:35 -0500
+Subject: [PATCH 1/3] Change arg parsing priority
+
+Read config files before parsing CLI args. Allows all options to be set
+via config and overridden on the CLI.
+---
+See also: https://github.com/zlin/wgetpaste/pull/46
+- Oskari
+
+ wgetpaste | 53 ++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 28 insertions(+), 25 deletions(-)
+
+diff --git a/wgetpaste b/wgetpaste
+index fc0b559..5f4152d 100755
+--- a/wgetpaste
++++ b/wgetpaste
+@@ -720,7 +720,32 @@ geturl() {
+ 	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
+@@ -756,6 +781,8 @@ done
+ # set the separated options as input options.
+ set -- "${ARGS[@]}"
+ 
++load_configs
++
+ while [[ -n $1 ]]; do
+ 	((args=1))
+ 	case "$1" in
+@@ -859,30 +886,6 @@ if [[ $NOANSI ]]; then
+ 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}
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/files/wgetpaste-2.33-test_ansi-add-A-to-the-tests.patch b/app-text/wgetpaste/files/wgetpaste-2.33-test_ansi-add-A-to-the-tests.patch
new file mode 100644
index 000000000000..14e8f2f6482a
--- /dev/null
+++ b/app-text/wgetpaste/files/wgetpaste-2.33-test_ansi-add-A-to-the-tests.patch
@@ -0,0 +1,171 @@
+From a1c0782e828bc5f0fc8b79d0131f1847c5e7b359 Mon Sep 17 00:00:00 2001
+From: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+Date: Sun, 13 Aug 2023 14:52:20 -0500
+Subject: [PATCH 3/3] test_ansi: add -A to the tests
+
+---
+See also: https://github.com/zlin/wgetpaste/pull/46
+- Oskari
+
+ test/test_ansi.sh | 92 +++++++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 81 insertions(+), 11 deletions(-)
+
+diff --git a/test/test_ansi.sh b/test/test_ansi.sh
+index 23b27a8..e1e95f0 100755
+--- a/test/test_ansi.sh
++++ b/test/test_ansi.sh
+@@ -94,8 +94,8 @@ fi
+ 
+ # 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 @@ else
+     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 @@ else
+         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 @@ else
+     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 @@ else
+ 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 @@ else
+     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,7 +217,7 @@ else
+ 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
+@@ -167,6 +227,16 @@ for dl_file in "$DL_DIR"/*.txt; do
+         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
+ 
+ echo "Total failed pastes: $FAILED_PASTE"
+ echo "Total mismatches: $DL_MISMATCH"
+-- 
+2.41.0
+

diff --git a/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild b/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
new file mode 100644
index 000000000000..6c78bad4e65a
--- /dev/null
+++ b/app-text/wgetpaste/wgetpaste-2.33-r4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature
+
+DESCRIPTION="Command-line interface to various pastebins"
+HOMEPAGE="https://github.com/zlin/wgetpaste"
+SRC_URI="https://github.com/zlin/wgetpaste/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="+ssl"
+
+PROPERTIES="test_network"
+RESTRICT="test"
+
+RDEPEND="net-misc/wget[ssl?]"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.33-tests.patch
+	"${FILESDIR}"/${PN}-2.33-disable-sprunge.patch
+	"${FILESDIR}"/${PN}-2.33-add-paste-gentoo-zip.patch
+	"${FILESDIR}"/${PN}-2.33-change-arg-parsing-priority.patch
+	"${FILESDIR}"/${PN}-2.33-add-A-ansi.patch
+	"${FILESDIR}"/${PN}-2.33-test_ansi-add-A-to-the-tests.patch
+	"${FILESDIR}"/${PN}-2.33-added-quiet-flag.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
+}
+
+src_test() {
+	test/test.sh || die
+}
+
+src_install() {
+	dobin ${PN}
+	insinto /usr/share/zsh/site-functions
+	doins _wgetpaste
+}
+
+pkg_postinst() {
+	optfeature "ANSI (color code) stripping support" app-text/ansifilter
+	optfeature "xclip support" x11-misc/xclip
+
+	if [[ -n ${REPLACING_VERSIONS} ]]; then
+		local old
+
+		for old in ${REPLACING_VERSIONS}; do
+			if ver_test ${old} -lt '2.33-r2'; then
+				ewarn
+				ewarn "Sprunge is dead and the service has been dropped from the code. Remove or"
+				ewarn "replace sprunge as the default service in the system or user wgetpaste"
+				ewarn "config if applicable."
+				ewarn
+				break
+			fi
+		done
+	fi
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-11 23:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 12:26 [gentoo-commits] repo/gentoo:master commit in: app-text/wgetpaste/files/, app-text/wgetpaste/ Yixun Lan
  -- strict thread matches above, loose matches on Subject: below --
2023-11-11 23:47 Yixun Lan
2023-11-11 23:47 Yixun Lan
2023-10-19  9:26 Florian Schmaus
2022-11-22  1:33 Sam James
2019-02-23 16:54 Ben Kohler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox