aboutsummaryrefslogtreecommitdiff
path: root/network/wput
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-09-26 16:06:46 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:27 +0700
commit37ba5f52cf0ec29fd1e29f9508a49618c5073673 (patch)
tree39e866e33b26c0d70c68f01c8ce27f3e93696d6b /network/wput
parent59a599b2b264643006e001bed85b339102af4dd6 (diff)
network/wput: Updated for version 0.6.2+git20130413_11.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/wput')
-rw-r--r--network/wput/README8
-rw-r--r--network/wput/doinst.sh11
-rw-r--r--network/wput/manpages.diff86
-rw-r--r--network/wput/slack-desc6
-rw-r--r--network/wput/wput.SlackBuild95
-rw-r--r--network/wput/wput.info8
6 files changed, 162 insertions, 52 deletions
diff --git a/network/wput/README b/network/wput/README
index 6c1fd72a3d135..bdc9324ad7529 100644
--- a/network/wput/README
+++ b/network/wput/README
@@ -1,5 +1,5 @@
-wput - A utility for putting files using the FTP protocol from the
- command line.
+wput (wget-like FTP uploader)
-wput is a tiny program that looks like wget and is designed to upload
-files or whole directories to remote ftp-servers.
+wput is a tiny program that looks like wget and is designed to upload
+files or whole directories to remote FTP servers. It uses ~/.netrc for
+login names and passwords.
diff --git a/network/wput/doinst.sh b/network/wput/doinst.sh
new file mode 100644
index 0000000000000..40da7bd48ee39
--- /dev/null
+++ b/network/wput/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config etc/wputrc.new
diff --git a/network/wput/manpages.diff b/network/wput/manpages.diff
new file mode 100644
index 0000000000000..ca30238907615
--- /dev/null
+++ b/network/wput/manpages.diff
@@ -0,0 +1,86 @@
+diff -Naur wput-0.6.2+git20130413/doc/wdel.1 wput-0.6.2+git20130413.patched/doc/wdel.1
+--- wput-0.6.2+git20130413/doc/wdel.1 2013-07-14 18:05:50.000000000 -0400
++++ wput-0.6.2+git20130413.patched/doc/wdel.1 2021-09-26 15:51:18.582864729 -0400
+@@ -12,7 +12,7 @@
+ .PP
+ Wdel supports connections through proxies, allowing you to use it in an
+ environment that can access the internet only via a proxy or to provide
+-anonymity by hiding your ip\-address to the server.
++anonymity by hiding your ip\-address from the server.
+ For SOCKSv5\-proxies Wdel supports also listening mode, allowing you to use
+ port-mode ftp through a proxy (useful if the remote ftp is behind a firewall
+ or a gateway).
+@@ -40,7 +40,7 @@
+ Many options can be set in a wputrc file. For its documentation consult the
+ sample file provided by Wput.
+ .PP
+-wput(1) describes all setable options. Not all apply for wdel too though.
++wput(1) describes all settable options. Not all apply for wdel too though.
+ .SH "AUTHOR"
+ .IX Header "AUTHOR"
+ Wdel is written by Hagen Fritsch <fritsch+wdel-man@in.tum.de>
+diff -Naur wput-0.6.2+git20130413/doc/wput.1 wput-0.6.2+git20130413.patched/doc/wput.1
+--- wput-0.6.2+git20130413/doc/wput.1 2021-09-26 15:50:42.259868954 -0400
++++ wput-0.6.2+git20130413.patched/doc/wput.1 2021-09-26 16:00:43.263799042 -0400
+@@ -20,7 +20,7 @@
+ .PP
+ Wput supports connections through proxies, allowing you to use it in an
+ environment that can access the internet only via a proxy or to provide
+-anonymity by hiding your ip\-address to the server.
++anonymity by hiding your ip\-address from the server.
+ For SOCKSv5\-proxies Wput supports also listening mode, allowing you to use
+ port-mode ftp through a proxy (useful if the remote ftp is behind a firewall
+ or a gateway).
+@@ -30,6 +30,11 @@
+ .PP
+ The upload-rate of Wput can be restricted, so that Wput won't eat all available
+ bandwidth.
++.PP
++Wput does not prompt for any usernames or passwords. It uses \fB~/.netrc\fR
++for login credentials. See \fBnetrc\fR(5). It's also possible to include
++the username and password in the URL, though this is highly discouraged
++since the password would be visible in \fBps\fR output.
+ .SS "URL\-Input\-Handling"
+ URLs are recognized by the ftp://\-prefix
+ .PP
+@@ -77,7 +82,7 @@
+
+ Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR!
+ Wput would upload all files from the current directory (since the first output
+-of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that
++of find will be '.') and afterwards each file again (since find posts its name to Wput. And further problematic is that Wput will upload each directory that
+ is given by find and since find itself recurses all directories, the files
+ would be uploaded three times (or even more often for further subdirectories).
+ Use \fIwput ftp://host/\fR to upload everything from the local directory.
+@@ -86,7 +91,7 @@
+ .TP
+ .BR \-I " \fIcommand\fP, " \-\-input\-pipe= \fIcommand\fP
+ If no file/directory can be "guessed" (see "Guessing Local File") from the URL,
+-the output of \fIcommand\fB is taken as file-input. command is invoked as follows:
++the output of \fIcommand\fR is taken as file-input. command is invoked as follows:
+
+ \& command ftp "username" "ip/hostname" port "remote_directory" "remote_filename"
+
+@@ -145,6 +150,7 @@
+ specified as a hostname or \s-1IP\s0 address. This option can be
+ useful if your machine is bound to multiple
+ IPs.
++.TP
+ .BR \-\-force\-tls
+ If this flag is specified and Wput is linked with the OpenSSL-library, the flag
+ enforces the usage of TLS: If no TLS\-connection can be established the process
+@@ -262,11 +268,13 @@
+ install]) and use this debug-dump.
+
+ .SH "SEE ALSO"
++.BR \fBnetrc\fR(5)
++.PP
+ .IX Header "SEE ALSO"
+ Many options can be set in a wputrc file. For its documentation consult the
+ sample file provided by Wput.
+ .PD 0
+-There are some USAGE.* files in the doc/ directory of Wput. These contain
++There are some USAGE.* files in \fB/usr/doc/wput-@VERSION@\fR. These contain
+ further information and samples on how to use Wput.
+
+ .SH "AUTHOR"
diff --git a/network/wput/slack-desc b/network/wput/slack-desc
index 57415caf83499..4ae6ad2eed793 100644
--- a/network/wput/slack-desc
+++ b/network/wput/slack-desc
@@ -6,11 +6,11 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-wput: wput (utility for putting files using the FTP protocol)
+wput: wput (wget-like FTP uploader)
wput:
wput: wput is a tiny program that looks like wget and is designed to upload
-wput: files or whole directories to remote ftp-servers.
-wput:
+wput: files or whole directories to remote FTP servers. It uses ~/.netrc for
+wput: login names and passwords.
wput:
wput:
wput:
diff --git a/network/wput/wput.SlackBuild b/network/wput/wput.SlackBuild
index 3270a0344adff..7d4138b3719b1 100644
--- a/network/wput/wput.SlackBuild
+++ b/network/wput/wput.SlackBuild
@@ -2,27 +2,18 @@
# Slackware build script for wput
-# Originally written by Chris Abela <chris.abela@maltats.com> May 2009
-
-# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Originally written by Chris Abela <email removed>.
+# Formerly maintained by Ryan P.C. McQuen.
+# Now maintained by B. Watson <yalhcru@gmail.com>.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20210926 bkw:
+# - update for v0.6.2+git20130413_11, for parity with Debian.
+# - install /etc/wputrc.new (also add doinst.sh).
+# - relicense as WTFPL with permission from Ryan P.C. McQuen (he's the one
+# who added the license; the original author didn't include one).
+# - add mention of ~/.netrc to the man page and our README.
# 20180103 bkw: update for v0.6.2. Which is from 9+ years ago...
@@ -34,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wput
-VERSION=${VERSION:-0.6.2}
+VERSION=${VERSION:-0.6.2+git20130413_11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -47,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -75,43 +63,66 @@ fi
set -e
+TARVER=${VERSION%_*}
+DEBVER=${VERSION#*_}
+
rm -rf $PKG
-mkdir -p $TMP $OUTPUT $PKG/usr/bin $PKG/usr/man/man1
+mkdir -p $TMP $OUTPUT $PKG
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$TARVER
+tar xvf $CWD/${PRGNAM}_${TARVER}.orig.tar.bz2
+cd $PRGNAM-$TARVER
+tar xvf $CWD/${PRGNAM}_${TARVER}-${DEBVER}.debian.tar.xz
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# Apply all of Debian's patches. These include security fixes, compile
+# fixes, typo/spelling fixes, etc.
+for i in $( cat debian/patches/series ); do
+ patch -p1 < debian/patches/$i
+done
+
+# Further typo/grammar/spelling fixes for man pages. Also mention
+# netrc(5) in wput.1, since it's not obvious.
+patch -p1 < $CWD/manpages.diff
+
+sed -i "s,@VERSION@,$VERSION," doc/*.1
+
+# Note to self: on 64-bit, we can ignore this warning from configure:
+# checking Large File System support: no
+# What it really means is that, on 64-bit, we don't need any extra
+# CFLAGS to enable large file (64-bit off_t) support. On 32-bit,
+# we get "yes", and the appropriate flags are used automatically.
+# If this were to fail on 32-bit, wput wouldn't be able to handle
+# files >= 2GB. Quite possibly, nobody would ever notice...
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=$PKG/usr \
+ --prefix=/usr \
+ --mandir=/usr/man \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux
-# Maximum compression for the man file:
-sed -i 's/gzip/gzip -9/' doc/Makefile
-# Unable to set --datadir for configure script:
-sed -i 's/^datadir *= $(prefix)\/share/datadir = $(prefix)/' Makefile
-
make
-make install
+make install DESTDIR=$PKG
strip $PKG/usr/bin/$PRGNAM
+# The shipped wputrc has everything commented out, so there's no reason
+# not to install it in /etc (used to be in the doc dir).
+mkdir -p $PKG/etc
+cp -a doc/wputrc $PKG/etc/wputrc.new
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS C* TODO doc/USAGE.* doc/passwordfile doc/wputrc \
+cp -a ABOUT-NLS C* TODO doc/USAGE.* doc/passwordfile \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/wput/wput.info b/network/wput/wput.info
index 9091147f16eb6..d10a5c5a1df1e 100644
--- a/network/wput/wput.info
+++ b/network/wput/wput.info
@@ -1,8 +1,10 @@
PRGNAM="wput"
-VERSION="0.6.2"
+VERSION="0.6.2+git20130413_11"
HOMEPAGE="http://wput.sourceforge.net/"
-DOWNLOAD="http://sourceforge.net/projects/wput/files/wput/0.6.2/wput-0.6.2.tgz"
-MD5SUM="a14c4c13d91d04d6119bdc977e8a8bdf"
+DOWNLOAD="https://deb.debian.org/debian/pool/main/w/wput/wput_0.6.2+git20130413.orig.tar.bz2 \
+ https://deb.debian.org/debian/pool/main/w/wput/wput_0.6.2+git20130413-11.debian.tar.xz"
+MD5SUM="8b4ff475940532ae086d37e3ba548b49 \
+ 3854d64196d39b119720e15dec01b4ce"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""