Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 521854 - app-text/wgetpaste-2.25 fails to upload to bpaste.net
Summary: app-text/wgetpaste-2.25 fails to upload to bpaste.net
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-08-31 22:21 UTC by nvinson234
Modified: 2014-09-14 12:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wgetpaste-2.25-bpaste.net.patch (wgetpaste-2.25-bpaste.net.patch,6.07 KB, patch)
2014-08-31 22:27 UTC, nvinson234
Details | Diff
wgetpaste-config-services (wgetpaste-config-services,112 bytes, text/plain)
2014-08-31 22:28 UTC, nvinson234
Details
wgetpaste-2.25.ebuild (wgetpaste-2.25.ebuild,1.07 KB, text/plain)
2014-08-31 22:29 UTC, nvinson234
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nvinson234 2014-08-31 22:21:25 UTC
A short while ago bpaste.net's backend was changed which broke wgetpaste support.  I have created a set of patches to correct the issue.

Reproducible: Always

Steps to Reproduce:
1. Run echo "hello1234" | wgetpaste (or wgetpaste -s bpaste.net)

Actual Results:  
bpaste.net submissions fail

Expected Results:  
bpaste.net submission should succeed.
Comment 1 nvinson234 2014-08-31 22:27:33 UTC
Created attachment 384026 [details, diff]
wgetpaste-2.25-bpaste.net.patch
Comment 2 nvinson234 2014-08-31 22:28:30 UTC
Created attachment 384028 [details]
wgetpaste-config-services

This change removes the redundant and obsolete bpaste.net entry.
Comment 3 nvinson234 2014-08-31 22:29:26 UTC
Created attachment 384030 [details]
wgetpaste-2.25.ebuild

I added 'inherit eutils' so I could use epatch to apply the bpaste.net patch.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-09-02 18:19:00 UTC
Comment on attachment 384030 [details]
wgetpaste-2.25.ebuild

--- wgetpaste-2.25.ebuild       2014-08-15 13:49:51.000000000 +0200
+++ -   2014-09-02 20:18:46.021062558 +0200
@@ -13,12 +13,15 @@
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
 IUSE="zsh-completion"

+inherit eutils
+
 DEPEND=""
 RDEPEND="net-misc/wget
        zsh-completion? ( app-shells/zsh )"

 src_prepare() {
        sed -i -e "s:/etc:\"${EPREFIX}\"/etc:g" wgetpaste || die
+       epatch "${FILESDIR}"/wgetpaste-2.25-bpaste.net.patch
 }

 src_install() {
Comment 5 Maxim Koltsov (RETIRED) gentoo-dev 2014-09-07 11:10:18 UTC
Fixed with revbump, thanks!
Comment 6 Oleh 2014-09-13 03:36:06 UTC
2.25-r1 didn't resolve or fix bpaste.net issue. Still unable to upload to this service.

echo "hello1234" | wgetpaste

Apparently nothing was received. Perhaps the connection failed. Enable --verbose or
--debug to get the output from wget that can help diagnose it correctly.
Comment 7 Maxim Koltsov (RETIRED) gentoo-dev 2014-09-13 04:52:46 UTC
(In reply to Oleg from comment #6)
> 2.25-r1 didn't resolve or fix bpaste.net issue. Still unable to upload to
> this service.
> 
> echo "hello1234" | wgetpaste
> 
> Apparently nothing was received. Perhaps the connection failed. Enable
> --verbose or
> --debug to get the output from wget that can help diagnose it correctly.

Wow, it somehow broke again. I'll try to debug it.
Comment 8 nvinson234 2014-09-13 17:17:44 UTC
(In reply to Maxim Koltsov from comment #7)
> (In reply to Oleg from comment #6)
> > 2.25-r1 didn't resolve or fix bpaste.net issue. Still unable to upload to
> > this service.
> > 
> > echo "hello1234" | wgetpaste
> > 
> > Apparently nothing was received. Perhaps the connection failed. Enable
> > --verbose or
> > --debug to get the output from wget that can help diagnose it correctly.
> 
> Wow, it somehow broke again. I'll try to debug it.

Looks like they switched from http to https.  Here's what I changed to wgetpaste to get it working again.  I can post this as an attachment, but I was not sure if you wanted me to merge the above patch with it.

--- wgetpaste.old	2014-09-13 12:56:23.983231056 -0400
+++ wgetpaste	2014-09-13 13:11:09.841651447 -0400
@@ -15,11 +15,11 @@
 
 ### services
 SERVICES="bpaste ca codepad dpaste gists poundpython"
 # bpaste
 ENGINE_bpaste=pinnwand
-URL_bpaste="http://bpaste.net/"
+URL_bpaste="https://bpaste.net/"
 DEFAULT_EXPIRATION_bpaste="1week"
 DEFAULT_LANGUAGE_bpaste="text"
 # ca
 ENGINE_ca=ca
 URL_ca="http://pastebin.ca/"
@@ -570,11 +570,11 @@
 	if [[ -n ${!regex} ]]; then
 		[[ needstdout = $1 ]] && return 0
 		sed -n -e "${!regex}" <<< "$*"
 	else
 		[[ needstdout = $1 ]] && return 1
-		sed -n -e 's|^.*Location: \(http://[^ ]*\).*$|\1|p' <<< "$*"
+		sed -n -e 's|^.*Location: \(http\(s\?\)://[^ ]*\).*$|\1|p' <<< "$*"
 	fi
 }
 
 ### read cli options
Comment 9 Maxim Koltsov (RETIRED) gentoo-dev 2014-09-14 12:52:11 UTC
I've commited new revision with fixed patch.