summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkgtools/pkg_install/Makefile12
-rw-r--r--pkgtools/pkg_install/files/add/Makefile.in4
-rw-r--r--pkgtools/pkg_install/files/admin/Makefile.in4
-rw-r--r--pkgtools/pkg_install/files/admin/main.c8
-rwxr-xr-xpkgtools/pkg_install/files/configure223
-rw-r--r--pkgtools/pkg_install/files/configure.ac24
-rw-r--r--pkgtools/pkg_install/files/create/Makefile.in4
-rw-r--r--pkgtools/pkg_install/files/create/build.c6
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.14
-rw-r--r--pkgtools/pkg_install/files/create/pkg_create.cat2
-rw-r--r--pkgtools/pkg_install/files/info/Makefile.in4
-rw-r--r--pkgtools/pkg_install/files/lib/config.h.in18
-rw-r--r--pkgtools/pkg_install/files/lib/license.c20
-rw-r--r--pkgtools/pkg_install/files/lib/pkg_io.c49
-rw-r--r--pkgtools/pkg_install/files/lib/version.h4
15 files changed, 274 insertions, 112 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 3e15d4f3208..db82561f809 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.178 2010/04/15 22:25:11 tron Exp $
+# $NetBSD: Makefile,v 1.179 2010/04/20 00:39:12 joerg Exp $
# Notes to package maintainers:
#
@@ -121,6 +121,10 @@ LDFLAGS+= -L${WRKDIR}/zlib
CPPFLAGS+= -I${WRKDIR}/libarchive/libarchive
LDFLAGS+= -L${WRKDIR}/libarchive/.libs
+LIBARCHIVE_LIBS= ${SED} -n -e 's/^Libs://p' -e 's/^Libs.private://p' \
+ ${WRKDIR}/libarchive/build/pkgconfig/libarchive.pc 2>/dev/null || echo
+LIBS+= ${LIBARCHIVE_LIBS:sh}
+
CONFIG_GUESS_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.guess
CONFIG_SUB_OVERRIDE+= ${WRKDIR}/libarchive/build/autoconf/config.sub
@@ -132,10 +136,14 @@ LDFLAGS+= -Wl,-search_paths_first
# Hack to make sure that the libarchive version is replaced
pre-configure: config-guess-override config-sub-override
+.else
+LIBS+= -larchive
.endif
CPPFLAGS+= -I${WRKDIR}/libfetch
LDFLAGS+= -L${WRKDIR}/libfetch
+CONFIGURE_ENV+= LIBS=${LIBS:Q}
+
do-extract:
@${CP} -R ${FILESDIR} ${WRKSRC}
.if empty(USE_BUILTIN.bzip2:M[yY][eE][sS])
@@ -162,7 +170,7 @@ pre-configure:
${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS} \
./configure --disable-shared --disable-bsdtar \
--disable-bsdcpio --without-expat --without-xml2 \
- --disable-dependency-tracking --disable-acl
+ --disable-dependency-tracking
cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
.endif
cd ${WRKDIR}/libfetch && ${SETENV} ${MAKE_ENV} \
diff --git a/pkgtools/pkg_install/files/add/Makefile.in b/pkgtools/pkg_install/files/add/Makefile.in
index 1bfc66ce846..a4050035c7c 100644
--- a/pkgtools/pkg_install/files/add/Makefile.in
+++ b/pkgtools/pkg_install/files/add/Makefile.in
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.21 2010/01/22 13:30:41 joerg Exp $
+# $NetBSD: Makefile.in,v 1.22 2010/04/20 00:39:12 joerg Exp $
srcdir= @srcdir@
@@ -20,7 +20,7 @@ LDFLAGS= @LDFLAGS@ -L../lib
SSL_SUPPORT= @ssl_support@
-LIBS= -linstall -lfetch -larchive -lbz2 -lz
+LIBS= -linstall -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lcrypto
.endif
diff --git a/pkgtools/pkg_install/files/admin/Makefile.in b/pkgtools/pkg_install/files/admin/Makefile.in
index 1c70bd4b9f2..d18e99c8cc1 100644
--- a/pkgtools/pkg_install/files/admin/Makefile.in
+++ b/pkgtools/pkg_install/files/admin/Makefile.in
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.19 2010/03/19 12:49:53 wiz Exp $
+# $NetBSD: Makefile.in,v 1.20 2010/04/20 00:39:12 joerg Exp $
srcdir= @srcdir@
@@ -28,7 +28,7 @@ PROG= pkg_admin
SCRIPTS= audit-packages download-vulnerability-list
.if empty(BOOTSTRAP)
-LIBS= -linstall -lbz2 -lfetch -larchive -lbz2 -lz
+LIBS= -linstall -lfetch
.if !empty(SSL_SUPPORT)
LIBS+= -lcrypto
CFLAGS+= -DHAVE_SSL
diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c
index 418e4020178..56770ac3d4f 100644
--- a/pkgtools/pkg_install/files/admin/main.c
+++ b/pkgtools/pkg_install/files/admin/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.60 2010/02/20 04:40:03 joerg Exp $ */
+/* $NetBSD: main.c,v 1.61 2010/04/20 00:39:13 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: main.c,v 1.60 2010/02/20 04:40:03 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.61 2010/04/20 00:39:13 joerg Exp $");
/*-
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -248,8 +248,8 @@ rebuild(void)
iterate_pkg_db(add_pkg, &count);
printf("\n");
- printf("Stored %zu file%s and %zu explicit director%s"
- " from %zu package%s in %s.\n",
+ printf("Stored %" PRIzu " file%s and %zu explicit director%s"
+ " from %"PRIzu " package%s in %s.\n",
count.files, count.files == 1 ? "" : "s",
count.directories, count.directories == 1 ? "y" : "ies",
count.packages, count.packages == 1 ? "" : "s",
diff --git a/pkgtools/pkg_install/files/configure b/pkgtools/pkg_install/files/configure
index 694446fe873..fad243b4c38 100755
--- a/pkgtools/pkg_install/files/configure
+++ b/pkgtools/pkg_install/files/configure
@@ -1,12 +1,14 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for pkg_install 20090911.
+# Generated by GNU Autoconf 2.65 for pkg_install 20090911.
#
# Report bugs to <joerg@NetBSD.org>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -527,7 +529,8 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -1321,7 +1324,7 @@ Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
@@ -1392,7 +1395,7 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pkg_install configure 20090911
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -1439,7 +1442,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1476,7 +1479,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1518,7 +1521,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1726,6 +1729,8 @@ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
'unsigned long long int' 'unsigned short int' 'unsigned char'; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1734,7 +1739,7 @@ $ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)];
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
test_array [0] = 0
;
@@ -1939,7 +1944,7 @@ rm -f conftest.val
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
cat >config.log <<_ACEOF
@@ -1947,7 +1952,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pkg_install $as_me 20090911, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2200,7 +2205,7 @@ fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -2209,9 +2214,9 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -2749,32 +2754,30 @@ $as_echo "$ac_try_echo"; } >&5
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -2836,10 +2839,10 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -2847,51 +2850,18 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -2924,13 +2894,72 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -4103,7 +4132,7 @@ fi
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
if ac_fn_c_try_link "$LINENO"; then :
@@ -4964,6 +4993,48 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+$as_echo_n "checking size of size_t... " >&6; }
+if test "${ac_cv_sizeof_size_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_size_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (size_t)
+See \`config.log' for more details." "$LINENO" 5; }; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+
+case $host in
+*-*-hpux*)
+ $as_echo "#define MISSING_SIZE_T_SUPPORT 1" >>confdefs.h
+
+
+ ;;
+esac
case $host in
*-*-dragonfly* |*-*-freebsd*)
@@ -5488,7 +5559,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by pkg_install $as_me 20090911, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5527,6 +5598,7 @@ Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -5546,10 +5618,11 @@ Report bugs to <joerg@NetBSD.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pkg_install config.status 20090911
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -5585,6 +5658,8 @@ do
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -5774,7 +5849,7 @@ s/'"$ac_delim"'$//
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -5788,7 +5863,7 @@ s/.\{148\}//
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac
index ff2b38300f5..b41d0711f46 100644
--- a/pkgtools/pkg_install/files/configure.ac
+++ b/pkgtools/pkg_install/files/configure.ac
@@ -1,4 +1,4 @@
-dnl $NetBSD: configure.ac,v 1.34 2010/01/23 22:41:43 joerg Exp $
+dnl $NetBSD: configure.ac,v 1.35 2010/04/20 00:39:12 joerg Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([pkg_install], [20090911], [joerg@NetBSD.org])
@@ -130,6 +130,16 @@ AC_LANG_POP([C])
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(size_t, [#include <stdlib.h>])
+
+case $host in
+*-*-hpux*)
+ AC_DEFINE(MISSING_SIZE_T_SUPPORT)
+ AH_TEMPLATE([MISSING_SIZE_T_SUPPORT], [
+ Define to 1 if the `z' modifider for printf is missing.
+])
+ ;;
+esac
case $host in
*-*-dragonfly* |*-*-freebsd*)
@@ -141,6 +151,18 @@ AH_BOTTOM(
#if !HAVE_VFORK
# define vfork fork
#endif
+
+#ifndef MISSING_SIZE_T_SUPPORT
+# define PRIzu "zu"
+#elif SIZEOF_SIZE_T == SIZEOF_INT
+# define PRIzu "u"
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define PRIzu "lu"
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define PRIzu "llu"
+#else
+# errror "Unknown size_t size"
+#endif
)
SYSCONFDIR="$sysconfdir"
diff --git a/pkgtools/pkg_install/files/create/Makefile.in b/pkgtools/pkg_install/files/create/Makefile.in
index 9e0791e0ed7..acdc1a5e029 100644
--- a/pkgtools/pkg_install/files/create/Makefile.in
+++ b/pkgtools/pkg_install/files/create/Makefile.in
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.17 2010/01/23 11:02:58 joerg Exp $
+# $NetBSD: Makefile.in,v 1.18 2010/04/20 00:39:13 joerg Exp $
srcdir= @srcdir@
@@ -24,7 +24,7 @@ INSTALL= @INSTALL@
PROG= pkg_create
.if empty(BOOTSTRAP)
-LIBS= -linstall -lfetch -larchive -lbz2 -lz @LIBS@
+LIBS= -linstall -lfetch @LIBS@
CPPFLAGS= @CPPFLAGS@ -I. -I$(srcdir) -I../lib
OBJS= main.o perform.o pl.o util.o build.o
.else
diff --git a/pkgtools/pkg_install/files/create/build.c b/pkgtools/pkg_install/files/create/build.c
index a5818cd8aba..6cdc7449f58 100644
--- a/pkgtools/pkg_install/files/create/build.c
+++ b/pkgtools/pkg_install/files/create/build.c
@@ -1,4 +1,4 @@
-/* $NetBSD: build.c,v 1.14 2009/11/05 16:22:32 joerg Exp $ */
+/* $NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: build.c,v 1.14 2009/11/05 16:22:32 joerg Exp $");
+__RCSID("$NetBSD: build.c,v 1.15 2010/04/20 00:39:13 joerg Exp $");
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -254,6 +254,8 @@ make_dist(const char *pkg, const char *suffix, const package_t *plist)
archive_write_set_compression_bzip2(archive);
else if (strcmp(CompressionType, "gzip") == 0)
archive_write_set_compression_gzip(archive);
+ else if (strcmp(CompressionType, "xz") == 0)
+ archive_write_set_compression_xz(archive);
else if (strcmp(CompressionType, "none") == 0)
archive_write_set_compression_none(archive);
else
diff --git a/pkgtools/pkg_install/files/create/pkg_create.1 b/pkgtools/pkg_install/files/create/pkg_create.1
index 17e4c2d0551..1412bbed056 100644
--- a/pkgtools/pkg_install/files/create/pkg_create.1
+++ b/pkgtools/pkg_install/files/create/pkg_create.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_create.1,v 1.24 2010/01/22 13:30:41 joerg Exp $
+.\" $NetBSD: pkg_create.1,v 1.25 2010/04/20 00:39:13 joerg Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -166,7 +166,7 @@ Use
as compression algorithm.
This overrides the heuristic to guess the compression type from the
output name.
-Currently supported values are bzip2, gzip and none.
+Currently supported values are bzip2, gzip, none and xz.
.It Fl f Ar packlist
Fetch
.Pq packing list
diff --git a/pkgtools/pkg_install/files/create/pkg_create.cat b/pkgtools/pkg_install/files/create/pkg_create.cat
index 7f60dd1dd5e..31c45b7075d 100644
--- a/pkgtools/pkg_install/files/create/pkg_create.cat
+++ b/pkgtools/pkg_install/files/create/pkg_create.cat
@@ -64,7 +64,7 @@ OOPPTTIIOONNSS
--FF _c_o_m_p_r_e_s_s_i_o_n
Use _c_o_m_p_r_e_s_s_i_o_n as compression algorithm. This overrides the
heuristic to guess the compression type from the output name.
- Currently supported values are bzip2, gzip and none.
+ Currently supported values are bzip2, gzip, none and xz.
--ff _p_a_c_k_l_i_s_t
Fetch (packing list) for package from the file _p_a_c_k_l_i_s_t or ssttddiinn
diff --git a/pkgtools/pkg_install/files/info/Makefile.in b/pkgtools/pkg_install/files/info/Makefile.in
index 787def7435a..2c337f69b2e 100644
--- a/pkgtools/pkg_install/files/info/Makefile.in
+++ b/pkgtools/pkg_install/files/info/Makefile.in
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.in,v 1.20 2010/01/22 13:30:42 joerg Exp $
+# $NetBSD: Makefile.in,v 1.21 2010/04/20 00:39:13 joerg Exp $
srcdir= @srcdir@
@@ -17,7 +17,7 @@ SSL_SUPPORT= @ssl_support@
CC= @CC@
CCLD= $(CC)
.if empty(BOOTSTRAP)
-LIBS= -linstall -larchive -lfetch -lbz2 -lz @LIBS@
+LIBS= -linstall -lfetch @LIBS@
.if !empty(SSL_SUPPORT)
LIBS+= -lcrypto
.endif
diff --git a/pkgtools/pkg_install/files/lib/config.h.in b/pkgtools/pkg_install/files/lib/config.h.in
index 8b791f2069c..2c57ea336a3 100644
--- a/pkgtools/pkg_install/files/lib/config.h.in
+++ b/pkgtools/pkg_install/files/lib/config.h.in
@@ -105,6 +105,9 @@
/* Define to 1 if you have the <vis.h> header file. */
#undef HAVE_VIS_H
+/* Define to 1 if the `z' modifider for printf is missing. */
+#undef MISSING_SIZE_T_SUPPORT
+
/* Defined when PRIu64 is missing or broken */
#undef NEED_PRI_MACRO
@@ -138,6 +141,9 @@
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -176,3 +182,15 @@
# define vfork fork
#endif
+#ifndef MISSING_SIZE_T_SUPPORT
+# define PRIzu "zu"
+#elif SIZEOF_SIZE_T == SIZEOF_INT
+# define PRIzu "u"
+#elif SIZEOF_SIZE_T == SIZEOF_LONG
+# define PRIzu "lu"
+#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+# define PRIzu "llu"
+#else
+# errror "Unknown size_t size"
+#endif
+
diff --git a/pkgtools/pkg_install/files/lib/license.c b/pkgtools/pkg_install/files/lib/license.c
index be423cad38b..5207ae94218 100644
--- a/pkgtools/pkg_install/files/lib/license.c
+++ b/pkgtools/pkg_install/files/lib/license.c
@@ -1,4 +1,4 @@
-/* $NetBSD: license.c,v 1.11 2010/01/22 13:30:42 joerg Exp $ */
+/* $NetBSD: license.c,v 1.12 2010/04/20 00:39:13 joerg Exp $ */
/*-
* Copyright (c) 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -162,7 +162,7 @@ acceptable_license(const char *license)
len = strlen(license);
if (strspn(license, license_chars) != len) {
- warnx("Invalid character in license name at position %zu", len);
+ warnx("Invalid character in license name at position %" PRIzu, len);
return -1;
}
@@ -204,7 +204,7 @@ acceptable_pkg_license_internal(const char **licensep, int toplevel, const char
} else {
len = strspn(license, license_chars);
if (len == 0) {
- warnx("Invalid character in license name at position %zu", license - start + 1);
+ warnx("Invalid character in license name at position %" PRIzu, license - start + 1);
return -1;
}
@@ -219,7 +219,7 @@ acceptable_pkg_license_internal(const char **licensep, int toplevel, const char
len = strspn(license, license_spaces);
if (len == 0 && *license && *license != ')') {
- warnx("Missing space at position %zu", license - start + 1);
+ warnx("Missing space at position %" PRIzu, license - start + 1);
return -1;
}
license += len;
@@ -227,7 +227,7 @@ acceptable_pkg_license_internal(const char **licensep, int toplevel, const char
if (*license == ')') {
if (!need_parenthesis) {
- warnx("Missing open parenthesis at position %zu", license - start + 1);
+ warnx("Missing open parenthesis at position %" PRIzu, license - start + 1);
return -1;
}
*licensep = license + 1;
@@ -235,7 +235,7 @@ acceptable_pkg_license_internal(const char **licensep, int toplevel, const char
}
if (*license == '\0') {
if (need_parenthesis) {
- warnx("Unbalanced parenthesis at position %zu", license - start + 1);
+ warnx("Unbalanced parenthesis at position %" PRIzu, license - start + 1);
return -1;
}
*licensep = license;
@@ -244,25 +244,25 @@ acceptable_pkg_license_internal(const char **licensep, int toplevel, const char
if (strncmp(license, "AND", 3) == 0) {
if (expr_type == 1) {
- warnx("Invalid operator in OR expression at position %zu", license - start + 1);
+ warnx("Invalid operator in OR expression at position %" PRIzu, license - start + 1);
return -1;
}
expr_type = 2;
license += 3;
} else if (strncmp(license, "OR", 2) == 0) {
if (expr_type == 2) {
- warnx("Invalid operator in AND expression at position %zu", license - start + 1);
+ warnx("Invalid operator in AND expression at position %" PRIzu, license - start + 1);
return -1;
}
expr_type = 1;
license += 2;
} else {
- warnx("Invalid operator at position %zu", license - start + 1);
+ warnx("Invalid operator at position %" PRIzu, license - start + 1);
return -1;
}
len = strspn(license, license_spaces);
if (len == 0 && *license != '(') {
- warnx("Missing space at position %zu", license - start + 1);
+ warnx("Missing space at position %" PRIzu, license - start + 1);
return -1;
}
license += len;
diff --git a/pkgtools/pkg_install/files/lib/pkg_io.c b/pkgtools/pkg_install/files/lib/pkg_io.c
index 8a0a0d5f653..59f934f9ceb 100644
--- a/pkgtools/pkg_install/files/lib/pkg_io.c
+++ b/pkgtools/pkg_install/files/lib/pkg_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pkg_io.c,v 1.10 2010/02/20 04:40:03 joerg Exp $ */
+/* $NetBSD: pkg_io.c,v 1.11 2010/04/20 00:39:13 joerg Exp $ */
/*-
* Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
* All rights reserved.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: pkg_io.c,v 1.10 2010/02/20 04:40:03 joerg Exp $");
+__RCSID("$NetBSD: pkg_io.c,v 1.11 2010/04/20 00:39:13 joerg Exp $");
#include <archive.h>
#include <archive_entry.h>
@@ -63,16 +63,22 @@ struct fetch_archive {
struct url *url;
fetchIO *fetch;
char buffer[32768];
+ off_t size;
+ int restart;
};
static int
fetch_archive_open(struct archive *a, void *client_data)
{
struct fetch_archive *f = client_data;
+ struct url_stat us;
- f->fetch = fetchGet(f->url, fetch_flags);
+ f->fetch = fetchXGet(f->url, &us, fetch_flags);
if (f->fetch == NULL)
return ENOENT;
+ f->size = us.size;
+ f->restart = 1;
+ f->url->offset = 0;
return 0;
}
@@ -81,9 +87,39 @@ fetch_archive_read(struct archive *a, void *client_data,
const void **buffer)
{
struct fetch_archive *f = client_data;
-
+ struct url_stat us;
+ ssize_t rv;
+
*buffer = f->buffer;
- return fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
+ rv = fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
+ if (rv > 0) {
+ f->url->offset += rv;
+ return rv;
+ }
+ if (f->restart == 0)
+ return rv;
+ if (rv == 0) {
+ if (f->size == -1)
+ return 0;
+ if (f->url->offset == f->size)
+ return 0;
+ }
+ f->restart = 0;
+ if (1) {
+ char *url = fetchStringifyURL(f->url);
+ fprintf(stderr, "Trying to reconnect %s\n", url);
+ free(url);
+ }
+ fetchIO_close(f->fetch);
+ f->fetch = fetchXGet(f->url, &us, fetch_flags);
+ if (f->fetch == NULL)
+ return -1;
+ if (us.size != f->size)
+ return -1;
+ rv = fetchIO_read(f->fetch, f->buffer, sizeof(f->buffer));
+ if (rv > 0)
+ f->url->offset += rv;
+ return rv;
}
static int
@@ -93,6 +129,7 @@ fetch_archive_close(struct archive *a, void *client_data)
if (f->fetch != NULL)
fetchIO_close(f->fetch);
+ fetchFreeURL(f->url);
free(f);
return 0;
}
@@ -104,7 +141,7 @@ open_archive_by_url(struct url *url, char **archive_name)
struct archive *a;
f = xmalloc(sizeof(*f));
- f->url = url;
+ f->url = fetchCopyURL(url);
*archive_name = fetchStringifyURL(url);
diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h
index fed93d9923c..98f1af6fbab 100644
--- a/pkgtools/pkg_install/files/lib/version.h
+++ b/pkgtools/pkg_install/files/lib/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.153 2010/04/14 18:24:58 joerg Exp $ */
+/* $NetBSD: version.h,v 1.154 2010/04/20 00:39:13 joerg Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -27,6 +27,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION 20100405
+#define PKGTOOLS_VERSION 20100420
#endif /* _INST_LIB_VERSION_H_ */