upgrade to wget 1.8.2

--
From: David Gwynne <loki at niteshade dot net> with a number of changes from me
This commit is contained in:
brad 2003-05-14 15:03:51 +00:00
parent fb05c8c0ad
commit 966be80fe8
10 changed files with 122 additions and 190 deletions

View File

@ -1,14 +1,13 @@
# $OpenBSD: Makefile,v 1.34 2002/12/10 18:37:24 brad Exp $
# $OpenBSD: Makefile,v 1.35 2003/05/14 15:03:51 brad Exp $
COMMENT= "retrieve files from the 'net via HTTP and FTP"
DISTNAME= wget-1.7
PKGNAME= ${DISTNAME}p1
DISTNAME= wget-1.8.2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GNU:=wget/}
MASTER_SITES0= ftp://ftp.kame.net/pub/kame/misc/
MASTER_SITES0= ftp://ftp.us.debian.org/debian/pool/main/w/wget/
PATCHFILES= wget-17-v6-20010716a.diff.gz:0
PATCHFILES= wget_1.8.2-10.diff.gz:0
PATCH_DIST_STRIP= -p1
HOMEPAGE= http://www.gnu.org/software/wget/
@ -17,31 +16,21 @@ MODULES= gettext
MAINTAINER= Brad Smith <brad@openbsd.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PATCH_LIST= ${PORTSDIR}/infrastructure/patches/patch-lt1.3.5-ltconfig \
${PORTSDIR}/infrastructure/patches/patch-lt1.3.5-ltmain_sh \
patch-*
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-ipv6
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lintl" \
post-patch:
@cd ${WRKSRC}; touch configure
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
MAKEINFO="makeinfo --no-split"
pre-build:
@mv -f ${WRKSRC}/doc/wget.texi ${WRKSRC}/doc/wget.texi.bak
@sed -e s#/usr/local/etc#${SYSCONFDIR}#g \
-e s#/usr/local#${PREFIX}#g \
${WRKSRC}/doc/wget.texi.bak > ${WRKSRC}/doc/wget.texi
@mv -f ${WRKSRC}/doc/sample.wgetrc ${WRKSRC}/doc/sample.wgetrc.bak
@sed -e s#/usr/local/etc#${SYSCONFDIR}#g \
${WRKSRC}/doc/sample.wgetrc.bak > ${WRKSRC}/doc/sample.wgetrc
@perl -pi -e s#/usr/local/etc#${SYSCONFDIR}#g ${WRKSRC}/doc/wget.texi
@perl -pi -e s#/usr/local#${PREFIX}#g ${WRKSRC}/doc/wget.texi
@perl -pi -e s#/usr/local/etc#${SYSCONFDIR}#g ${WRKSRC}/doc/sample.wgetrc
.include <bsd.port.mk>

View File

@ -1,6 +1,6 @@
MD5 (wget-1.7.tar.gz) = c911a6b937c0a18757d3211fb62831de
MD5 (wget-17-v6-20010716a.diff.gz) = 95664b130be966834f7770d66d03654b
RMD160 (wget-1.7.tar.gz) = 17fc3c68da2d4a2bb97af6b96a885564b458aeed
RMD160 (wget-17-v6-20010716a.diff.gz) = 083c444f892d32ee7fb94ed2d234964fc954d6a6
SHA1 (wget-1.7.tar.gz) = b44118972c11a410b81ad3d306861b370071e611
SHA1 (wget-17-v6-20010716a.diff.gz) = 02ddc575dc2cd33b38a2b111662198b77ef67491
MD5 (wget-1.8.2.tar.gz) = a2473d7a53ebaf0a1bdb06f17059e8f1
MD5 (wget_1.8.2-10.diff.gz) = 185bc9a76c3b547172a45cc1ec3bb666
RMD160 (wget-1.8.2.tar.gz) = 4fc6a381f3022b0fd45b8cc95f372d71e6986904
RMD160 (wget_1.8.2-10.diff.gz) = 61e60070296352f2b95db9917ac29f849fd7f7a8
SHA1 (wget-1.8.2.tar.gz) = cb14189c47f281b33fd1ef37c4c8df39250fa7d5
SHA1 (wget_1.8.2-10.diff.gz) = 6ff5fa41ce1040eab00b647816b481236a00cd28

View File

@ -1,43 +1,34 @@
$OpenBSD: patch-configure,v 1.3 2002/12/10 18:22:06 brad Exp $
--- configure.orig Tue Dec 10 13:03:25 2002
+++ configure Tue Dec 10 13:03:25 2002
@@ -3715,7 +3715,7 @@ else
cat conftest.$ac_ext >&5
fi
rm -f conftest*
- LDFLAGS=$ODL_LDFLAGS
+ LDFLAGS=$OLD_LDFLAGS
test -n "$dash_r" && break
done ;;
esac
@@ -4001,7 +4001,7 @@ EOF
done
if test x"$ssl_linked" = xno; then
- LD_FLAGS=$OLD_LDFLAGS
+ LDFLAGS=$OLD_LDFLAGS
LIBS=$OLD_LIBS
echo
echo "WARNING: Failed to link with OpenSSL libraries in $ssl_root/lib."
@@ -4010,7 +4010,7 @@ EOF
fi
fi
-ALL_LINGUAS=`(cd ${srcdir}/po && ls *.po | sed -e 's/\.po$//')`
+ALL_LINGUAS="cs da de el es et fr gl hr it ja nl no pl pt_BR ru sk sl sv tr zh_TW"
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
@@ -4246,7 +4246,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$a
$OpenBSD: patch-configure,v 1.4 2003/05/14 15:03:51 brad Exp $
--- configure.orig Wed May 14 06:11:09 2003
+++ configure Wed May 14 06:14:11 2003
@@ -3468,7 +3468,7 @@ else
hardcode_direct=yes
hardcode_shlibpath_var=no
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
export_dynamic_flag_spec='${wl}-E'
else
@@ -3478,7 +3478,7 @@ else
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
@@ -7811,7 +7811,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$a
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lintl $LIBS"
+LIBS="-lintl -liconv $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4252 "configure"
#line 7817 "configure"
#include "confdefs.h"
@@ -4275,7 +4275,7 @@ fi
@@ -7840,7 +7840,7 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
@ -46,3 +37,12 @@ $OpenBSD: patch-configure,v 1.3 2002/12/10 18:22:06 brad Exp $
cat >> confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF
@@ -7923,7 +7923,7 @@ done
case "${MAKEINFO}" in
- *makeinfo) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi" ;;
+ *makeinfo*) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi" ;;
*emacs | *xemacs) MAKEINFO="${MAKEINFO} -batch -q -no-site-file -eval '(find-file \"\$(srcdir)/wget.texi\")' -l texinfmt -f texinfo-format-buffer -f save-buffer" ;;
*) MAKEINFO="makeinfo \$(srcdir)/wget.texi" ;;
esac

View File

@ -1,30 +0,0 @@
$OpenBSD: patch-configure_in,v 1.1 2001/10/02 03:15:03 brad Exp $
--- configure.in.orig Mon Oct 1 22:06:55 2001
+++ configure.in Mon Oct 1 22:45:23 2001
@@ -443,7 +443,7 @@ case "$host_os" in
OLD_LDFLAGS=$LDFLAGS
LDFLAGS="${try_dash_r}/no/such/file-or-directory $LDFLAGS"
AC_TRY_LINK(, , dash_r="$try_dash_r")
- LDFLAGS=$ODL_LDFLAGS
+ LDFLAGS=$OLD_LDFLAGS
test -n "$dash_r" && break
done ;;
esac
@@ -555,7 +555,7 @@ main(){return 0;}
done
if test x"$ssl_linked" = xno; then
- LD_FLAGS=$OLD_LDFLAGS
+ LDFLAGS=$OLD_LDFLAGS
LIBS=$OLD_LIBS
dnl Perhaps we should abort here. Remember that the user
dnl explicitly requested linking with SSL.
@@ -569,7 +569,7 @@ fi
dnl
dnl Set of available languages.
dnl
-ALL_LINGUAS=`(cd ${srcdir}/po && ls *.po | sed -e 's/\.po$//')`
+ALL_LINGUAS="cs da de el es et fr gl hr it ja nl no pl pt_BR ru sk sl sv tr zh_TW"
dnl Originally this used to be static, looking like this:
dnl ALL_LINGUAS="cs de hr it ..."

View File

@ -1,17 +1,8 @@
$OpenBSD: patch-doc_Makefile.in,v 1.3 2001/10/02 03:15:03 brad Exp $
--- doc/Makefile.in.orig Thu Apr 12 08:25:22 2001
+++ doc/Makefile.in Mon Oct 1 20:19:28 2001
@@ -22,7 +22,7 @@
SHELL = /bin/sh
# Program to format Texinfo source into Info files.
-MAKEINFO = @MAKEINFO@
+MAKEINFO = @MAKEINFO@ --no-split
# Program to format Texinfo source into DVI files.
TEXI2DVI = texi2dvi
# Program to convert DVI files to PostScript
$OpenBSD: patch-doc_Makefile_in,v 1.1 2003/05/14 15:03:51 brad Exp $
--- doc/Makefile.in.orig Wed May 14 16:13:38 2003
+++ doc/Makefile.in Wed May 14 16:21:33 2003
@@ -51,7 +51,7 @@ RM = rm -f
TEXI2POD = ./texi2pod.pl
TEXI2POD = $(srcdir)/texi2pod.pl
POD2MAN = @POD2MAN@
MAN = wget.$(manext)
-WGETRC = $(sysconfdir)/wgetrc
@ -20,19 +11,19 @@ $OpenBSD: patch-doc_Makefile.in,v 1.3 2001/10/02 03:15:03 brad Exp $
#
@@ -66,6 +66,7 @@ $(SAMPLERCTEXI): $(srcdir)/sample.wgetrc
sed s/@/@@/g $< > $@
sed s/@/@@/g $? > $@
wget.info: $(SAMPLERCTEXI) $(srcdir)/wget.texi
+ @rm -f wget.info*
-$(MAKEINFO)
$(MAKEINFO) -I$(srcdir)
$(TEXI2POD): $(srcdir)/$(TEXI2POD).in
@@ -119,25 +120,8 @@ install.man: $(MAN)
$(TEXI2POD): $(TEXI2POD).in
@@ -127,22 +128,8 @@ install.man: $(MAN)
# install sample.wgetrc
install.wgetrc: $(srcdir)/sample.wgetrc
- $(top_srcdir)/mkinstalldirs $(sysconfdir)
- @if test -f $(WGETRC); then \
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
- @if test -f $(DESTDIR)$(WGETRC); then \
- if cmp -s $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); then echo ""; \
- else \
- echo ' $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC).new'; \
@ -43,9 +34,6 @@ $OpenBSD: patch-doc_Makefile.in,v 1.3 2001/10/02 03:15:03 brad Exp $
- echo " consider merging in the new lines from"; \
- echo " \`$(DESTDIR)$(WGETRC).new'."; \
- echo; \
- echo "<Hit RETURN to acknowledge>\c"; \
- read user_input; \
- echo; \
- fi; \
- else \
- $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-doc_sample_wgetrc,v 1.1 2003/02/06 22:03:21 brad Exp $
--- doc/sample.wgetrc.orig Thu Feb 6 16:57:29 2003
+++ doc/sample.wgetrc Thu Feb 6 16:58:20 2003
@@ -39,7 +39,7 @@
# connections from the outside. On these sites you have to use the
# `passive' feature of FTP. If you are behind such a firewall, you
# can turn this on to make Wget use passive FTP by default.
-#passive_ftp = off
+passive_ftp = on
# The "wait" command below makes Wget wait between every connection.
# If, instead, you want Wget to wait only between retries of failed

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-doc_wget.texi,v 1.3 2001/10/02 03:15:03 brad Exp $
--- doc/wget.texi.orig Mon Jun 4 07:23:23 2001
+++ doc/wget.texi Mon Oct 1 22:07:04 2001
$OpenBSD: patch-doc_wget_texi,v 1.1 2003/05/14 15:03:51 brad Exp $
--- doc/wget.texi.orig Wed May 14 16:25:42 2003
+++ doc/wget.texi Wed May 14 16:26:13 2003
@@ -9,6 +9,11 @@
@setchapternewpage on
@c %**end of header

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_fnmatch_c,v 1.1 2002/12/10 18:37:24 brad Exp $
--- src/fnmatch.c.orig Tue Dec 10 13:06:09 2002
+++ src/fnmatch.c Tue Dec 10 13:07:23 2002
@@ -188,6 +188,17 @@ fnmatch (const char *pattern, const char
return (FNM_NOMATCH);
}
+/* Return non-zero if S has a leading '/' or contains '../' */
+int
+has_invalid_name (const char *s)
+{
+ if (*s == '/')
+ return 1;
+ if (strstr(s, "../") != 0)
+ return 1;
+ return 0;
+}
+
/* Return non-zero if S contains globbing wildcards (`*', `?', `[' or
`]'). */
int

View File

@ -1,40 +0,0 @@
$OpenBSD: patch-src_ftp_c,v 1.1 2002/12/10 18:37:24 brad Exp $
--- src/ftp.c.orig Tue Dec 10 13:08:00 2002
+++ src/ftp.c Tue Dec 10 13:16:22 2002
@@ -1637,6 +1637,7 @@ ftp_retrieve_glob (struct urlinfo *u, cc
{
struct fileinfo *orig, *start;
uerr_t res;
+ struct fileinfo *f;
con->cmd |= LEAVE_PENDING;
@@ -1648,8 +1649,7 @@ ftp_retrieve_glob (struct urlinfo *u, cc
opt.accepts and opt.rejects. */
if (opt.accepts || opt.rejects)
{
- struct fileinfo *f = orig;
-
+ f = orig;
while (f)
{
if (f->type != FT_DIRECTORY && !acceptable (f->name))
@@ -1661,6 +1661,18 @@ ftp_retrieve_glob (struct urlinfo *u, cc
f = f->next;
}
}
+ /* Remove all files with possible harmful names */
+ f = orig;
+ while (f)
+ {
+ if (has_invalid_name(f->name))
+ {
+ logprintf (LOG_VERBOSE, _("Rejecting `%s'.\n"), f->name);
+ f = delelement (f, &start);
+ }
+ else
+ f = f->next;
+ }
/* Now weed out the files that do not match our globbing pattern.
If we are dealing with a globbing pattern, that is. */
if (*u->file && (action == GLOBALL || action == GETONE))

View File

@ -1,10 +1,12 @@
@comment $OpenBSD: PLIST,v 1.14 2001/10/02 03:15:03 brad Exp $
@comment $OpenBSD: PLIST,v 1.15 2003/05/14 15:03:52 brad Exp $
bin/wget
@unexec install-info --delete --info-dir=%D/info %D/info/wget.info
info/wget.info
@exec install-info --info-dir=%D/info %D/info/wget.info
man/man1/wget.1
share/examples/wget/sample.wgetrc
share/locale/bg/LC_MESSAGES/wget.mo
share/locale/ca/LC_MESSAGES/wget.mo
share/locale/cs/LC_MESSAGES/wget.mo
share/locale/da/LC_MESSAGES/wget.mo
share/locale/de/LC_MESSAGES/wget.mo
@ -13,7 +15,9 @@ share/locale/es/LC_MESSAGES/wget.mo
share/locale/et/LC_MESSAGES/wget.mo
share/locale/fr/LC_MESSAGES/wget.mo
share/locale/gl/LC_MESSAGES/wget.mo
share/locale/he/LC_MESSAGES/wget.mo
share/locale/hr/LC_MESSAGES/wget.mo
share/locale/hu/LC_MESSAGES/wget.mo
share/locale/it/LC_MESSAGES/wget.mo
share/locale/ja/LC_MESSAGES/wget.mo
share/locale/nl/LC_MESSAGES/wget.mo
@ -25,5 +29,59 @@ share/locale/sk/LC_MESSAGES/wget.mo
share/locale/sl/LC_MESSAGES/wget.mo
share/locale/sv/LC_MESSAGES/wget.mo
share/locale/tr/LC_MESSAGES/wget.mo
share/locale/uk/LC_MESSAGES/wget.mo
share/locale/zh_TW/LC_MESSAGES/wget.mo
@comment @dirrm share/locale/zh_TW/LC_MESSAGES
@comment @dirrm share/locale/zh_TW
@comment @dirrm share/locale/uk/LC_MESSAGES
@comment @dirrm share/locale/uk
@comment @dirrm share/locale/tr/LC_MESSAGES
@comment @dirrm share/locale/tr
@comment @dirrm share/locale/sv/LC_MESSAGES
@comment @dirrm share/locale/sv
@comment @dirrm share/locale/sl/LC_MESSAGES
@comment @dirrm share/locale/sl
@comment @dirrm share/locale/sk/LC_MESSAGES
@comment @dirrm share/locale/sk
@comment @dirrm share/locale/ru/LC_MESSAGES
@comment @dirrm share/locale/ru
@comment @dirrm share/locale/pt_BR/LC_MESSAGES
@comment @dirrm share/locale/pt_BR
@comment @dirrm share/locale/pl/LC_MESSAGES
@comment @dirrm share/locale/pl
@comment @dirrm share/locale/no/LC_MESSAGES
@comment @dirrm share/locale/no
@comment @dirrm share/locale/nl/LC_MESSAGES
@comment @dirrm share/locale/nl
@comment @dirrm share/locale/ja/LC_MESSAGES
@comment @dirrm share/locale/ja
@comment @dirrm share/locale/it/LC_MESSAGES
@comment @dirrm share/locale/it
@comment @dirrm share/locale/hu/LC_MESSAGES
@comment @dirrm share/locale/hu
@comment @dirrm share/locale/hr/LC_MESSAGES
@comment @dirrm share/locale/hr
@comment @dirrm share/locale/he/LC_MESSAGES
@comment @dirrm share/locale/he
@comment @dirrm share/locale/gl/LC_MESSAGES
@comment @dirrm share/locale/gl
@comment @dirrm share/locale/fr/LC_MESSAGES
@comment @dirrm share/locale/fr
@comment @dirrm share/locale/et/LC_MESSAGES
@comment @dirrm share/locale/et
@comment @dirrm share/locale/es/LC_MESSAGES
@comment @dirrm share/locale/es
@comment @dirrm share/locale/el/LC_MESSAGES
@comment @dirrm share/locale/el
@comment @dirrm share/locale/de/LC_MESSAGES
@comment @dirrm share/locale/de
@comment @dirrm share/locale/da/LC_MESSAGES
@comment @dirrm share/locale/da
@comment @dirrm share/locale/cs/LC_MESSAGES
@comment @dirrm share/locale/cs
@comment @dirrm share/locale/ca/LC_MESSAGES
@comment @dirrm share/locale/ca
@comment @dirrm share/locale/bg/LC_MESSAGES
@comment @dirrm share/locale/bg
@comment @dirrm share/locale
@dirrm share/examples/wget