head	1.51;
access;
symbols
	RELENG_8_4:1.51.0.2
	RELENG_9_1_0_RELEASE:1.44.2.3.2.2
	RELENG_9_1:1.44.2.3.0.2
	RELENG_9_1_BP:1.44.2.3
	RELENG_8_3_0_RELEASE:1.38.2.5.2.1
	RELENG_8_3:1.38.2.5.0.2
	RELENG_8_3_BP:1.38.2.5
	RELENG_9_0_0_RELEASE:1.44.2.1.2.1
	RELENG_9_0:1.44.2.1.0.2
	RELENG_9_0_BP:1.44.2.1
	RELENG_9:1.44.0.2
	RELENG_9_BP:1.44
	RELENG_7_4_0_RELEASE:1.11.2.7.6.1
	RELENG_8_2_0_RELEASE:1.38.2.1.6.1
	RELENG_7_4:1.11.2.7.0.6
	RELENG_7_4_BP:1.11.2.7
	RELENG_8_2:1.38.2.1.0.6
	RELENG_8_2_BP:1.38.2.1
	RELENG_8_1_0_RELEASE:1.38.2.1.4.1
	RELENG_8_1:1.38.2.1.0.4
	RELENG_8_1_BP:1.38.2.1
	RELENG_7_3_0_RELEASE:1.11.2.7.4.1
	RELENG_7_3:1.11.2.7.0.4
	RELENG_7_3_BP:1.11.2.7
	RELENG_8_0_0_RELEASE:1.38.2.1.2.1
	RELENG_8_0:1.38.2.1.0.2
	RELENG_8_0_BP:1.38.2.1
	RELENG_8:1.38.0.2
	RELENG_8_BP:1.38
	RELENG_7_2_0_RELEASE:1.11.2.7.2.1
	RELENG_7_2:1.11.2.7.0.2
	RELENG_7_2_BP:1.11.2.7
	RELENG_7_1_0_RELEASE:1.11.2.6.2.1
	RELENG_6_4_0_RELEASE:1.23.2.9.2.2
	RELENG_7_1:1.11.2.6.0.2
	RELENG_7_1_BP:1.11.2.6
	RELENG_6_4:1.23.2.9.0.2
	RELENG_6_4_BP:1.23.2.9
	RELENG_6:1.23.0.2
	RELENG_7_0_0_RELEASE:1.11
	RELENG_7_0:1.11.0.4
	RELENG_7_0_BP:1.11
	RELENG_7:1.11.0.2
	RELENG_7_BP:1.11;
locks; strict;
comment	@# @;


1.51
date	2013.03.23.02.24.59;	author svnexp;	state Exp;
branches
	1.51.2.1;
next	1.50;

1.50
date	2012.11.17.01.49.20;	author svnexp;	state Exp;
branches;
next	1.49;

1.49
date	2012.07.30.14.47.35;	author mm;	state Exp;
branches;
next	1.48;

1.48
date	2012.07.28.06.38.44;	author mm;	state Exp;
branches;
next	1.47;

1.47
date	2012.02.25.10.58.02;	author mm;	state Exp;
branches;
next	1.46;

1.46
date	2011.12.22.08.42.07;	author mm;	state Exp;
branches;
next	1.45;

1.45
date	2011.12.20.20.06.33;	author mm;	state Exp;
branches;
next	1.44;

1.44
date	2011.08.07.08.42.36;	author mm;	state Exp;
branches
	1.44.2.1;
next	1.43;

1.43
date	2011.07.17.21.27.38;	author mm;	state Exp;
branches;
next	1.42;

1.42
date	2010.12.07.16.48.01;	author kientzle;	state Exp;
branches;
next	1.41;

1.41
date	2010.03.02.18.44.08;	author uqs;	state Exp;
branches;
next	1.40;

1.40
date	2009.12.30.06.12.03;	author kientzle;	state Exp;
branches;
next	1.39;

1.39
date	2009.12.30.05.59.21;	author kientzle;	state Exp;
branches;
next	1.38;

1.38
date	2009.04.27.20.09.05;	author kientzle;	state Exp;
branches
	1.38.2.1;
next	1.37;

1.37
date	2009.04.27.19.30.09;	author kientzle;	state Exp;
branches;
next	1.36;

1.36
date	2009.04.27.18.27.54;	author kientzle;	state Exp;
branches;
next	1.35;

1.35
date	2009.04.17.01.06.31;	author kientzle;	state Exp;
branches;
next	1.34;

1.34
date	2009.03.07.02.09.21;	author kientzle;	state Exp;
branches;
next	1.33;

1.33
date	2009.03.06.04.55.51;	author kientzle;	state Exp;
branches;
next	1.32;

1.32
date	2009.03.06.04.35.31;	author kientzle;	state Exp;
branches;
next	1.31;

1.31
date	2009.01.26.05.44.40;	author kientzle;	state Exp;
branches;
next	1.30;

1.30
date	2009.01.21.06.55.27;	author kientzle;	state Exp;
branches;
next	1.29;

1.29
date	2008.12.06.07.08.08;	author kientzle;	state Exp;
branches;
next	1.28;

1.28
date	2008.10.19.00.18.44;	author kientzle;	state Exp;
branches;
next	1.27;

1.27
date	2008.09.30.04.02.36;	author kientzle;	state Exp;
branches;
next	1.26;

1.26
date	2008.09.30.03.57.07;	author kientzle;	state Exp;
branches;
next	1.25;

1.25
date	2008.09.08.00.58.12;	author kientzle;	state Exp;
branches;
next	1.24;

1.24
date	2008.08.25.06.08.22;	author kientzle;	state Exp;
branches;
next	1.23;

1.23
date	2008.06.26.11.58.26;	author des;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2008.06.26.10.53.05;	author des;	state Exp;
branches;
next	1.21;

1.21
date	2008.06.15.05.05.53;	author kientzle;	state Exp;
branches;
next	1.20;

1.20
date	2008.05.27.04.12.17;	author kientzle;	state Exp;
branches;
next	1.19;

1.19
date	2008.05.26.17.00.24;	author kientzle;	state Exp;
branches;
next	1.18;

1.18
date	2008.03.15.02.22.08;	author kientzle;	state Exp;
branches;
next	1.17;

1.17
date	2008.03.15.01.43.59;	author kientzle;	state Exp;
branches;
next	1.16;

1.16
date	2008.03.14.20.35.38;	author kientzle;	state Exp;
branches;
next	1.15;

1.15
date	2008.03.12.05.12.23;	author kientzle;	state Exp;
branches;
next	1.14;

1.14
date	2008.01.31.07.47.38;	author kientzle;	state Exp;
branches;
next	1.13;

1.13
date	2008.01.18.05.05.58;	author kientzle;	state Exp;
branches;
next	1.12;

1.12
date	2008.01.01.22.28.04;	author kientzle;	state Exp;
branches;
next	1.11;

1.11
date	2007.07.13.15.14.35;	author kientzle;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2007.07.13.15.12.52;	author kientzle;	state Exp;
branches;
next	1.9;

1.9
date	2007.06.22.05.49.13;	author kientzle;	state Exp;
branches;
next	1.8;

1.8
date	2007.06.22.05.47.00;	author kientzle;	state Exp;
branches;
next	1.7;

1.7
date	2007.06.13.03.35.37;	author kientzle;	state Exp;
branches;
next	1.6;

1.6
date	2007.06.13.02.08.03;	author sepotvin;	state Exp;
branches;
next	1.5;

1.5
date	2007.05.29.01.00.20;	author kientzle;	state Exp;
branches;
next	1.4;

1.4
date	2007.04.14.08.20.31;	author kientzle;	state Exp;
branches;
next	1.3;

1.3
date	2007.04.07.05.54.23;	author kientzle;	state Exp;
branches;
next	1.2;

1.2
date	2007.03.08.06.09.27;	author kientzle;	state Exp;
branches;
next	1.1;

1.1
date	2007.03.03.07.37.37;	author kientzle;	state Exp;
branches;
next	;

1.51.2.1
date	2013.03.23.02.24.59;	author svnexp;	state dead;
branches;
next	1.51.2.2;

1.51.2.2
date	2013.03.28.13.02.56;	author svnexp;	state Exp;
branches;
next	;

1.44.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.44.2.1.2.1;
next	1.44.2.2;

1.44.2.2
date	2012.01.05.11.44.55;	author mm;	state Exp;
branches;
next	1.44.2.3;

1.44.2.3
date	2012.01.05.12.52.05;	author mm;	state Exp;
branches
	1.44.2.3.2.1;
next	1.44.2.4;

1.44.2.4
date	2012.11.17.11.36.16;	author svnexp;	state Exp;
branches;
next	;

1.44.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.44.2.1.2.2;

1.44.2.1.2.2
date	2012.11.17.08.36.16;	author svnexp;	state Exp;
branches;
next	;

1.44.2.3.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.44.2.3.2.2;

1.44.2.3.2.2
date	2012.11.17.08.47.06;	author svnexp;	state Exp;
branches;
next	;

1.38.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.38.2.1.2.1
	1.38.2.1.4.1
	1.38.2.1.6.1;
next	1.38.2.2;

1.38.2.2
date	2011.08.01.07.59.02;	author mm;	state Exp;
branches;
next	1.38.2.3;

1.38.2.3
date	2011.08.10.08.40.59;	author mm;	state Exp;
branches;
next	1.38.2.4;

1.38.2.4
date	2012.01.05.11.45.22;	author mm;	state Exp;
branches;
next	1.38.2.5;

1.38.2.5
date	2012.01.05.12.57.14;	author mm;	state Exp;
branches
	1.38.2.5.2.1;
next	1.38.2.6;

1.38.2.6
date	2012.11.17.10.36.01;	author svnexp;	state Exp;
branches;
next	;

1.38.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.38.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.38.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.38.2.5.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.38.2.5.2.2;

1.38.2.5.2.2
date	2012.11.17.08.24.41;	author svnexp;	state Exp;
branches;
next	;

1.23.2.1
date	2008.08.10.21.18.59;	author kientzle;	state Exp;
branches;
next	1.23.2.2;

1.23.2.2
date	2008.08.10.21.45.52;	author kientzle;	state Exp;
branches;
next	1.23.2.3;

1.23.2.3
date	2008.08.11.01.50.00;	author kientzle;	state Exp;
branches;
next	1.23.2.4;

1.23.2.4
date	2008.08.11.02.20.24;	author kientzle;	state Exp;
branches;
next	1.23.2.5;

1.23.2.5
date	2008.08.11.03.00.44;	author kientzle;	state Exp;
branches;
next	1.23.2.6;

1.23.2.6
date	2008.08.11.05.03.44;	author kientzle;	state Exp;
branches;
next	1.23.2.7;

1.23.2.7
date	2008.08.13.03.27.33;	author kientzle;	state Exp;
branches;
next	1.23.2.8;

1.23.2.8
date	2008.08.13.04.33.31;	author kientzle;	state Exp;
branches;
next	1.23.2.9;

1.23.2.9
date	2008.08.27.05.06.51;	author kientzle;	state Exp;
branches
	1.23.2.9.2.1;
next	1.23.2.10;

1.23.2.10
date	2008.10.23.04.50.06;	author kientzle;	state Exp;
branches;
next	1.23.2.11;

1.23.2.11
date	2012.11.17.07.39.34;	author svnexp;	state Exp;
branches;
next	;

1.23.2.9.2.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	1.23.2.9.2.2;

1.23.2.9.2.2
date	2008.10.23.04.51.14;	author kientzle;	state Exp;
branches;
next	;

1.11.2.1
date	2008.02.11.00.31.08;	author kientzle;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	2008.05.21.04.14.39;	author kientzle;	state Exp;
branches;
next	1.11.2.3;

1.11.2.3
date	2008.08.10.04.32.47;	author kientzle;	state Exp;
branches;
next	1.11.2.4;

1.11.2.4
date	2008.08.10.05.30.28;	author kientzle;	state Exp;
branches;
next	1.11.2.5;

1.11.2.5
date	2008.08.27.04.46.47;	author kientzle;	state Exp;
branches;
next	1.11.2.6;

1.11.2.6
date	2008.10.23.04.48.48;	author kientzle;	state Exp;
branches
	1.11.2.6.2.1;
next	1.11.2.7;

1.11.2.7
date	2009.02.09.03.31.53;	author kientzle;	state Exp;
branches
	1.11.2.7.2.1
	1.11.2.7.4.1
	1.11.2.7.6.1;
next	1.11.2.8;

1.11.2.8
date	2012.11.17.08.01.48;	author svnexp;	state Exp;
branches;
next	;

1.11.2.6.2.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.11.2.7.2.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.11.2.7.4.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.11.2.7.6.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.11.2.7.6.2;

1.11.2.7.6.2
date	2012.11.17.08.16.41;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.51
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248616
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/lib/libarchive/test/Makefile 248616 2013-03-22 13:36:03Z mm $

LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive

NO_MAN=yes

PROG=libarchive_test
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

.PATH:  ${LIBARCHIVEDIR}/libarchive/test
TESTS= \
	test_acl_freebsd_nfs4.c			\
	test_acl_freebsd_posix1e.c		\
	test_acl_nfs4.c				\
	test_acl_pax.c				\
	test_acl_posix1e.c			\
	test_archive_api_feature.c		\
	test_archive_clear_error.c		\
	test_archive_cmdline.c			\
	test_archive_crypto.c			\
	test_archive_getdate.c			\
	test_archive_match_time.c		\
	test_archive_match_owner.c		\
	test_archive_match_path.c		\
	test_archive_pathmatch.c		\
	test_archive_read_close_twice.c		\
	test_archive_read_close_twice_open_fd.c	\
	test_archive_read_close_twice_open_filename.c	\
	test_archive_read_multiple_data_objects.c	\
	test_archive_read_next_header_empty.c	\
	test_archive_read_next_header_raw.c	\
	test_archive_read_open2.c		\
	test_archive_read_set_filter_option.c	\
	test_archive_read_set_format_option.c	\
	test_archive_read_set_option.c		\
	test_archive_read_set_options.c		\
	test_archive_read_support.c		\
	test_archive_set_error.c		\
	test_archive_string.c			\
	test_archive_string_conversion.c	\
	test_archive_write_add_filter_by_name.c	\
	test_archive_write_set_filter_option.c	\
	test_archive_write_set_format_by_name.c	\
	test_archive_write_set_format_option.c	\
	test_archive_write_set_option.c		\
	test_archive_write_set_options.c	\
	test_bad_fd.c				\
	test_compat_bzip2.c			\
	test_compat_cpio.c			\
	test_compat_gtar.c			\
	test_compat_gzip.c			\
	test_compat_lzip.c			\
	test_compat_lzma.c			\
	test_compat_lzop.c			\
	test_compat_mac.c			\
	test_compat_pax_libarchive_2x.c		\
	test_compat_solaris_tar_acl.c		\
	test_compat_solaris_pax_sparse.c	\
	test_compat_tar_hardlink.c		\
	test_compat_uudecode.c			\
	test_compat_xz.c			\
	test_compat_zip.c			\
	test_empty_write.c			\
	test_entry.c				\
	test_entry_strmode.c			\
	test_extattr_freebsd.c			\
	test_filter_count.c			\
	test_fuzz.c				\
	test_gnutar_filename_encoding.c		\
	test_link_resolver.c			\
	test_open_fd.c				\
	test_open_failure.c			\
	test_open_file.c			\
	test_open_filename.c			\
	test_pax_filename_encoding.c		\
	test_read_data_large.c			\
	test_read_disk.c			\
	test_read_disk_directory_traversals.c	\
	test_read_disk_entry_from_file.c	\
	test_read_extract.c			\
	test_read_file_nonexistent.c		\
	test_read_filter_grzip.c		\
	test_read_filter_lrzip.c		\
	test_read_filter_lzop.c			\
	test_read_filter_lzop_multiple_parts.c	\
	test_read_filter_program.c		\
	test_read_filter_program_signature.c	\
	test_read_filter_uudecode.c		\
	test_read_format_7zip.c			\
	test_read_format_ar.c			\
	test_read_format_cab.c			\
	test_read_format_cab_filename.c		\
	test_read_format_cpio_afio.c		\
	test_read_format_cpio_bin.c		\
	test_read_format_cpio_bin_Z.c		\
	test_read_format_cpio_bin_be.c		\
	test_read_format_cpio_bin_bz2.c		\
	test_read_format_cpio_bin_gz.c		\
	test_read_format_cpio_bin_lzip.c	\
	test_read_format_cpio_bin_lzma.c	\
	test_read_format_cpio_bin_xz.c		\
	test_read_format_cpio_filename.c	\
	test_read_format_cpio_odc.c		\
	test_read_format_cpio_svr4_gzip.c	\
	test_read_format_cpio_svr4c_Z.c		\
	test_read_format_cpio_svr4_bzip2_rpm.c	\
	test_read_format_cpio_svr4_gzip_rpm.c	\
	test_read_format_empty.c		\
	test_read_format_gtar_filename.c	\
	test_read_format_gtar_gz.c		\
	test_read_format_gtar_lzma.c		\
	test_read_format_gtar_sparse.c		\
	test_read_format_iso_Z.c		\
	test_read_format_iso_multi_extent.c	\
	test_read_format_iso_xorriso.c		\
	test_read_format_isorr_rr_moved.c	\
	test_read_format_isojoliet_bz2.c	\
	test_read_format_isojoliet_long.c	\
	test_read_format_isojoliet_rr.c		\
	test_read_format_isojoliet_versioned.c	\
	test_read_format_isorr_bz2.c		\
	test_read_format_isorr_ce.c		\
	test_read_format_isorr_new_bz2.c	\
	test_read_format_isozisofs_bz2.c	\
	test_read_format_lha.c			\
	test_read_format_lha_filename.c		\
	test_read_format_mtree.c		\
	test_read_format_pax_bz2.c		\
	test_read_format_rar.c			\
	test_read_format_raw.c			\
	test_read_format_tar.c			\
	test_read_format_tar_empty_filename.c	\
	test_read_format_tar_filename.c		\
	test_read_format_tbz.c			\
	test_read_format_tgz.c			\
	test_read_format_tlz.c			\
	test_read_format_txz.c			\
	test_read_format_tz.c			\
	test_read_format_ustar_filename.c	\
	test_read_format_xar.c			\
	test_read_format_zip.c			\
	test_read_format_zip_comment_stored.c	\
	test_read_format_zip_filename.c		\
	test_read_format_zip_mac_metadata.c	\
	test_read_format_zip_sfx.c		\
	test_read_large.c			\
	test_read_pax_truncated.c		\
	test_read_position.c			\
	test_read_set_format.c			\
	test_read_truncated.c			\
	test_read_truncated_filter.c		\
	test_sparse_basic.c			\
	test_tar_filenames.c			\
	test_tar_large.c			\
	test_ustar_filenames.c			\
	test_ustar_filename_encoding.c		\
	test_write_disk.c			\
	test_write_disk_appledouble.c		\
	test_write_disk_failures.c		\
	test_write_disk_hardlink.c		\
	test_write_disk_hfs_compression.c	\
	test_write_disk_lookup.c		\
	test_write_disk_mac_metadata.c		\
	test_write_disk_no_hfs_compression.c	\
	test_write_disk_perms.c			\
	test_write_disk_secure.c		\
	test_write_disk_sparse.c		\
	test_write_disk_symlink.c		\
	test_write_disk_times.c			\
	test_write_filter_b64encode.c		\
	test_write_filter_bzip2.c		\
	test_write_filter_compress.c		\
	test_write_filter_gzip.c		\
	test_write_filter_gzip_timestamp.c	\
	test_write_filter_lrzip.c		\
	test_write_filter_lzip.c		\
	test_write_filter_lzma.c		\
	test_write_filter_lzop.c		\
	test_write_filter_program.c		\
	test_write_filter_uuencode.c		\
	test_write_filter_xz.c			\
	test_write_format_7zip.c		\
	test_write_format_7zip_empty.c		\
	test_write_format_7zip_large.c		\
	test_write_format_ar.c			\
	test_write_format_cpio.c		\
	test_write_format_cpio_empty.c		\
	test_write_format_cpio_newc.c		\
	test_write_format_cpio_odc.c		\
	test_write_format_gnutar.c		\
	test_write_format_iso9660.c		\
	test_write_format_iso9660_boot.c	\
	test_write_format_iso9660_empty.c	\
	test_write_format_iso9660_filename.c	\
	test_write_format_iso9660_zisofs.c	\
	test_write_format_mtree.c		\
	test_write_format_mtree_absolute_path.c	\
	test_write_format_mtree_classic.c	\
	test_write_format_mtree_classic_indent.c	\
	test_write_format_mtree_fflags.c	\
	test_write_format_mtree_no_separator.c	\
	test_write_format_mtree_quoted_filename.c	\
	test_write_format_pax.c			\
	test_write_format_shar_empty.c		\
	test_write_format_tar.c			\
	test_write_format_tar_empty.c		\
	test_write_format_tar_sparse.c		\
	test_write_format_tar_ustar.c		\
	test_write_format_tar_v7tar.c		\
	test_write_format_xar.c			\
	test_write_format_xar_empty.c		\
	test_write_format_zip.c			\
	test_write_format_zip_empty.c		\
	test_write_format_zip_no_compression.c	\
	test_write_zip_set_compression_store.c	\
	test_write_open_memory.c		\
	test_zip_filename_encoding.c

# Build the test program.
SRCS= \
	${TESTS}				\
	list.h					\
	main.c					\
	read_open_memory.c

.PATH:	${LIBARCHIVEDIR}/test_utils
SRCS+=	test_utils.c

# Build libarchive_test and run it.
check test: libarchive_test
	./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test

# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
list.h: ${TESTS} Makefile
	(cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
	grep DEFINE_TEST > ${.OBJDIR}/list.h

CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend
CLEANDIRS += .deps .libs

cleantest:
	-chmod -R +w /tmp/libarchive_test.*
	rm -rf /tmp/libarchive_test.*

.include <bsd.prog.mk>
@


1.51.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:02:56 +0000
@
text
@d1 256
@


1.51.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 154
# $FreeBSD: releng/8.4/lib/libarchive/test/Makefile 229596 2012-01-05 12:57:14Z mm $

LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive

NO_MAN=yes

PROG=libarchive_test
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

.PATH:  ${LIBARCHIVEDIR}/libarchive/test
TESTS= \
	test_acl_basic.c			\
	test_acl_freebsd.c			\
	test_acl_pax.c				\
	test_archive_api_feature.c		\
	test_bad_fd.c				\
	test_compat_bzip2.c			\
	test_compat_cpio.c			\
	test_compat_gtar.c			\
	test_compat_gzip.c			\
	test_compat_lzma.c			\
	test_compat_solaris_tar_acl.c		\
	test_compat_tar_hardlink.c		\
	test_compat_xz.c			\
	test_compat_zip.c			\
	test_empty_write.c			\
	test_entry.c				\
	test_entry_strmode.c			\
	test_extattr_freebsd.c			\
	test_fuzz.c				\
	test_link_resolver.c			\
	test_open_fd.c				\
	test_open_failure.c			\
	test_open_file.c			\
	test_open_filename.c			\
	test_pax_filename_encoding.c		\
	test_read_compress_program.c		\
	test_read_data_large.c			\
	test_read_disk.c			\
	test_read_disk_entry_from_file.c	\
	test_read_extract.c			\
	test_read_file_nonexistent.c		\
	test_read_format_ar.c			\
	test_read_format_cpio_bin.c		\
	test_read_format_cpio_bin_Z.c		\
	test_read_format_cpio_bin_be.c		\
	test_read_format_cpio_bin_bz2.c		\
	test_read_format_cpio_bin_gz.c		\
	test_read_format_cpio_bin_lzma.c	\
	test_read_format_cpio_bin_xz.c		\
	test_read_format_cpio_odc.c		\
	test_read_format_cpio_svr4_gzip.c	\
	test_read_format_cpio_svr4c_Z.c		\
	test_read_format_cpio_svr4_bzip2_rpm.c	\
	test_read_format_cpio_svr4_gzip_rpm.c	\
	test_read_format_empty.c		\
	test_read_format_gtar_gz.c		\
	test_read_format_gtar_lzma.c		\
	test_read_format_gtar_sparse.c		\
	test_read_format_iso_Z.c		\
	test_read_format_iso_multi_extent.c	\
	test_read_format_isorr_rr_moved.c	\
	test_read_format_isojoliet_bz2.c	\
	test_read_format_isojoliet_long.c	\
	test_read_format_isojoliet_rr.c		\
	test_read_format_isorr_bz2.c		\
	test_read_format_isorr_ce.c		\
	test_read_format_isorr_new_bz2.c	\
	test_read_format_isozisofs_bz2.c	\
	test_read_format_mtree.c		\
	test_read_format_pax_bz2.c		\
	test_read_format_raw.c			\
	test_read_format_tar.c			\
	test_read_format_tar_empty_filename.c	\
	test_read_format_tbz.c			\
	test_read_format_tgz.c			\
	test_read_format_tlz.c			\
	test_read_format_txz.c			\
	test_read_format_tz.c			\
	test_read_format_xar.c			\
	test_read_format_zip.c			\
	test_read_large.c			\
	test_read_pax_truncated.c		\
	test_read_position.c			\
	test_read_truncated.c			\
	test_read_uu.c				\
	test_tar_filenames.c			\
	test_tar_large.c			\
	test_ustar_filenames.c			\
	test_write_compress.c			\
	test_write_compress_bzip2.c		\
	test_write_compress_gzip.c		\
	test_write_compress_lzma.c		\
	test_write_compress_program.c		\
	test_write_compress_xz.c		\
	test_write_disk.c			\
	test_write_disk_failures.c		\
	test_write_disk_hardlink.c		\
	test_write_disk_perms.c			\
	test_write_disk_secure.c		\
	test_write_disk_sparse.c		\
	test_write_disk_symlink.c		\
	test_write_disk_times.c			\
	test_write_format_ar.c			\
	test_write_format_cpio.c		\
	test_write_format_cpio_empty.c		\
	test_write_format_cpio_newc.c		\
	test_write_format_cpio_odc.c		\
	test_write_format_mtree.c		\
	test_write_format_pax.c			\
	test_write_format_shar_empty.c		\
	test_write_format_tar.c			\
	test_write_format_tar_empty.c		\
	test_write_format_tar_ustar.c		\
	test_write_format_zip.c			\
	test_write_format_zip_empty.c		\
	test_write_format_zip_no_compression.c	\
	test_write_open_memory.c


# Build the test program.
SRCS= \
	${TESTS}				\
	list.h					\
	main.c					\
	read_open_memory.c

# Build libarchive_test and run it.
check test: libarchive_test
	./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test

# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
list.h: ${TESTS} Makefile
	(cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
	grep DEFINE_TEST > ${.OBJDIR}/list.h

CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend
CLEANDIRS += .deps .libs

cleantest:
	-chmod -R +w /tmp/libarchive_test.*
	rm -rf /tmp/libarchive_test.*

.include <bsd.prog.mk>
@


1.50
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libarchive/test/Makefile 238909 2012-07-30 14:47:35Z mm $
d13 2
a14 1
CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR}/libarchive -I${.OBJDIR}
d30 1
d40 1
d52 1
d54 1
d65 1
d71 1
a86 1
	test_read_compress_program.c		\
d93 7
d153 1
d155 2
d160 1
a162 1
	test_read_uu.c				\
a167 7
	test_write_compress.c			\
	test_write_compress_bzip2.c		\
	test_write_compress_gzip.c		\
	test_write_compress_lzip.c		\
	test_write_compress_lzma.c		\
	test_write_compress_program.c		\
	test_write_compress_xz.c		\
d169 1
d172 1
d174 2
d181 12
d194 2
d208 3
d212 2
d220 1
d226 1
d237 3
@


1.49
log
@SVN rev 238909 on 2012-07-30 14:47:35Z by mm

Backport NFSv4 ACL fix from libarchive master branch.

Source:
https://github.com/libarchive/libarchive/commit/f67370d5

Obtained from:	libarchive (master branch)
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.48
log
@SVN rev 238856 on 2012-07-28 06:38:44Z by mm

Update libarchive to 3.0.4
@
text
@d22 2
a23 1
	test_acl_freebsd.c			\
@


1.47
log
@SVN rev 232153 on 2012-02-25 10:58:02Z by mm

Update libarchive to 3.0.3

Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
	https://github.com/libarchive/libarchive/wiki/ReleaseNotes
@
text
@d29 5
@


1.46
log
@SVN rev 228797 on 2011-12-22 08:42:07Z by mm

Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

MFC after:	2 weeks
@
text
@d13 1
a13 1
CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
a21 1
	test_acl_basic.c			\
d23 1
d25 1
d27 20
d52 1
d54 2
d57 1
d65 1
d67 1
d77 1
d81 1
d83 3
d91 1
d94 1
d101 1
d107 1
d112 1
d117 2
d121 1
d125 1
d131 1
d134 1
d139 1
d141 1
d145 1
d149 1
d156 1
d162 1
d168 6
d175 1
d180 1
d182 2
d187 2
a188 2
	test_write_open_memory.c

@


1.45
log
@SVN rev 228745 on 2011-12-20 20:06:33Z by mm

Update libarchive, tar and cpio to version 2.8.5

The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
@
text
@d3 1
a3 2
# Where to find the libarchive sources
LA_SRCDIR=${.CURDIR}/..
d5 16
a137 15
NO_MAN=yes

PROG=libarchive_test
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
CFLAGS+= -g
CFLAGS+= -I${LA_SRCDIR} -I.
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

d140 1
a140 1
	./libarchive_test -r ${.CURDIR}
d144 2
a145 1
	(cd ${.CURDIR}; cat test_*.c) | grep DEFINE_TEST > list.h
@


1.44
log
@SVN rev 224691 on 2011-08-07 08:42:36Z by mm

Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

In addition, merge following important bugfixes from
libarchive's release/2.8 branch:

Revision 2812:
Merge 2811 from trunk:  Don't try to verify that compression-level=0
produces larger results than the default compression, since this isn't
true for all versions of liblzma.

Revision 2817:
Merge 2814 from trunk: Fix Issue 121 (mtree parser error)
http://code.google.com/p/libarchive/issues/detail?id=121

Revision 2820:
Fix issue 119.
Change the file location check that a file location does not exceed
volume block. New one is that a file content does not exceed volume
block(end of an ISO image). It is better than previous check even
if the issue did not happen.

While reading an ISO image generated by an older version of mkisofs
utility, a file location indicates the end the ISO image if its file
size is zero and it is the last file of all files of the ISO image,
so it is possible that the location value is the same as the number
of the total block of the ISO image.

http://code.google.com/p/libarchive/issues/detail?id=119

Revision 2955:
Issue 134:  Fix libarchive 2.8 crashing in archive_write_finish() when
the open has failed and we're trying to write Zip format.

http://code.google.com/p/libarchive/issues/detail?id=134

Revision 2958:
Followup on Issue 134:
 1) Port test_open_failure to libarchive 2.8 branch to test
    the problem reported in Issue 134.
    This test also shows that archive_read_open() sometimes
    fails to report open errors correctly.
 2) Fix the bug in archive_read.c
 3) Comment out the tests that close functions are invoked
    promptly when open fails; that's fully fixed in libarchive 3.0,
    but I don't think it's worth fixing here.

Revision 3484:
Use uintmax_t with %ju

Revision 3487:
Fix issue 163.
Correctly allocate enough memory for a input buffer saved.

http://code.google.com/p/libarchive/issues/detail?id=163

Revision 3542:
Merge 2516, 2536 from trunk:  Allow path table offset values of
0 and 18, which are used by some ISO writers.

Reviewed by:	kientzle
Approved by:	re (kib)
MFC after:	3 days
@
text
@d55 1
a55 1
	test_read_format_iso_gz.c		\
@


1.44.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.44.2.2
log
@SVN rev 229588 on 2012-01-05 11:44:55Z by mm

MFC r228744, r228745, r228748:

MFC r228744 [1]:
Merge vendor revision 3723:
Fixes extraction of Zip entries that use length-at-end without specifying
either the compressed or uncompressed length.  In particular, fixes bsdtar
extraction of such files.

Reported by:	Patrick Lamaiziere <patfbsd@@davenulle.org> (freebsd-stable@@)

MFC r228745:
Update libarchive, tar and cpio to version 2.8.5

The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from:	http://code.google.com/p/libarchive

MFC r228748:
Sync libarchive with vendor branch release/2.8:

3730:
Fix issue 174 (Windows path names, not relevant for FreeBSD)

3734:
Merge r1989: archive_clear_error should set errno to 0.

3735:
Merge r3247 from trunk: Clear errors before returning
from archive_read_support_format_all()

3799:
Check the position before dereferencing the pointer.
This avoids dereferencing one byte past the end of a string

3824:
Merge r3823 from trunk for issue 199 (hang in iso9660 reading)

Obtained from:	http://code.google.com/p/libarchive
@
text
@d55 1
a55 1
	test_read_format_iso_Z.c		\
@


1.44.2.3
log
@SVN rev 229595 on 2012-01-05 12:52:05Z by mm

MFC r228797:
Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.
@
text
@d3 2
a4 1
LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive
a5 16
NO_MAN=yes

PROG=libarchive_test
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

.PATH:  ${LIBARCHIVEDIR}/libarchive/test
d123 15
d140 1
a140 1
	./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test
d144 1
a144 2
	(cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
	grep DEFINE_TEST > ${.OBJDIR}/list.h
@


1.44.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/lib/libarchive/test/Makefile 229595 2012-01-05 12:52:05Z mm $
@


1.44.2.3.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.44.2.3.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/lib/libarchive/test/Makefile 229595 2012-01-05 12:52:05Z mm $
@


1.44.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.44.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/lib/libarchive/test/Makefile 224691 2011-08-07 08:42:36Z mm $
@


1.43
log
@SVN rev 224152 on 2011-07-17 21:27:38Z by mm

- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)

Approved by:	kientzle
MFC after:	2 weeks
@
text
@d28 1
@


1.42
log
@SVN rev 216258 on 2010-12-07 16:48:01Z by kientzle

Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

MFC after: 3 days
@
text
@d48 2
d74 1
@


1.41
log
@SVN rev 204596 on 2010-03-02 18:44:08Z by uqs

Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)
@
text
@a4 4
.PATH: ${LA_SRCDIR}

# Get a list of all libarchive source files
LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS
d112 2
a113 2
# Build the test program using all libarchive sources + the test sources.
SRCS= ${LA_SRCS}				\
d124 2
a125 2
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
LDADD= -lz -lbz2 -lmd -lcrypto -lbsdxml
d128 1
a128 4

# Uncomment to build and test lzma and xz support via liblzma
#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
#LDADD+= -L/usr/local/lib -llzma
@


1.40
log
@SVN rev 201248 on 2009-12-30 06:12:03Z by kientzle

UU decoder.  Now that libarchive can recursively taste input streams,
you can do things like this:  tar xvf archive.tar.gz.uu
@
text
@a139 1
#WARNS=6
@


1.39
log
@SVN rev 201247 on 2009-12-30 05:59:21Z by kientzle

A raft of test changes and improvements from the Googlecode repository.
In particular, this includes tests for the new features I've merged
over the last few days.
@
text
@d81 1
@


1.38
log
@SVN rev 191594 on 2009-04-27 20:09:05Z by kientzle

Merge r990,r1044 from libarchive.googlecode.com:
read_support_format_raw() allows people to exploit libarchive's
automatic decompression support by simply stubbing out the
archive format handler.
The raw handler is not enabled by support_format_all(), of course.
It bids 1 on any non-empty input and always returns a single
entry named "data" with no properties set.
@
text
@d17 1
d20 1
d47 1
d57 2
d60 2
d63 3
d73 1
d96 1
d109 3
d126 1
a126 1
DPADD=${LIBBZ2} ${LIBZ}
d128 1
a128 1
LDADD= -lz -lbz2 -lmd -lcrypto
a131 4
# Uncomment to build and test lzma support via liblzmadec
#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMADEC=1 -DHAVE_LZMADEC_H=1
#LDADD+= -L/usr/local/lib -llzmadec

d139 1
a139 1
WARNS=6
d143 1
a143 1
	./libarchive_test -v -r ${.CURDIR}
@


1.38.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.38.2.2
log
@SVN rev 224561 on 2011-08-01 07:59:02Z by mm

Sync libarchive with 9-CURRENT:

MFC on lib/libarchive:
196961,200351,201077,201079-201097,201099-201112,201155-201157,
201159-201163,201165,201167-201171,201246-201250,201253,202868-202869,
202871-202873,203952,208027,208169,208184,208263,208291,210825,213573,
214822,214867,214905,216258,221472,224152

MFC 196961 (kientzle):
Update tests to match r195873, which corrected how hardlinked files
on iso9660 images were returned.  While I'm poking around, update
some comments around this area to try to clarify what's going on and
what still remains to be improved.

MFC 200351 (kientzle):
Merge two cpio fixes from libarchive.googlecode.com:
 1) Avoid an infinite loop in the header resync for certain malformed
    archives.
 2) Don't try to match hardlinks if the nlinks count is < 2.   This
    reduces the likelihood of a false hardlink match due to ino truncation.

MFC 201077 (kientzle):
Update format manpages for libarchive.

MFC 201079 (kientzle):
Update the hard-coded configuration for libarchive.

MFC 201080 (kientzle):
Remove some unused variables and dead assignments.

MFC 201081 (kientzle):
Remove a dead assignment.

MFC 201082 (kientzle):
Catch certain gzip failures at close time.

MFC 201083 (kientzle):
Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r
and a minor style fix for the hash function.

MFC 201084 (kientzle):
Sync with googlecode some changes that have no impact on FreeBSD.

MFC 201085 (kientzle):
Compatibility:  I found some more compilers that don't like 'inline' keyword.
Protection:  Discourage people from using this header outside libarchive.

MFC 201086 (kientzle):
Discourage people from using this header outside of libarchive.

MFC 201087 (kientzle):
Enforce this as an internal-only header.

MFC 201088 (kientzle):
Allow more formats to be active at a time; discourage outside use.

MFC 201089 (kientzle):
Portability: terminate abnormally via abort() instead of segfault,
watch the return value from write(), and avoid signed arithmetic on
unsigned values.

MFC 201091 (kientzle):
Remove dead assignment.

MFC 201092 (kientzle):
Discourage outside use of this internal header.

MFC 201093 (kientzle):
Portability:  Set the file descriptor to binary mode on Win32

MFC 201094 (kientzle):
Eliminate an unused assignment.

MFC 201095 (kientzle):
Remove an unused variable and an unnecessary increment.

MFC 201096 (kientzle):
Various portability fixes, plus:
 * New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates

MFC 201097 (kientzle):
Portability fixes.

MFC 201099 (kientzle):
Use new ino64 interface.

MFC 201110 (kientzle):
Clarify an example so Linux folks won't keep getting confused by this
point.

MFC 201111 (kientzle):
Remove some dead assignments, fix some declarations.

MFC 201112 (kientzle):
Portability.

MFC 201155 (kientzle):
64-bit ino support and discourage bad use of this header.

MFC 201156 (kientzle):
Various style and portability fixes, including:
 * Enforce option interface can only be used before the archive is opened
 * Correctly handle large skips on platforms with 32-bit off_t
 * Use int64_t instead of off_t

MFC 201157 (kientzle):
Catch decompression failures earlier.  In particular, this gives
immediate feedback if we fail to fork an external decompression program.

MFC 201159 (kientzle):
Various fixes when creating objects on disk:
 * Write xattrs last instead of first (required on platforms that use
   system xattrs for security attributes)
 * Better handling of chdir() failures
 * Don't bother trying to shorten files via seek()/write()
 * Fix build on systems that lack link()/symlink()/mknod()
 * Prefer futimens()/utimensat() when they're present

MFC 201160 (kientzle):
Various style fixes to the 'newc' cpio writer:
 * Warn about truncation of ino
 * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation
 * Eliminate some unused variables

MFC 201161 (kientzle):
Style fixes to tar reader:
  For portability, prefer int64_t to off_t.
  Improve numeric overflow handling when parsing.
  Fix some variable types.
  Eliminate some unused results.

MFC 201162 (kientzle):
Style and portability fixes for pax writer.  Mostly very routine, except for:
 * Use ino64 where appropriate
 * Don't pass atime or nsec to ustar formatter

MFC 201163 (kientzle):
Be a little more skeptical of dev/ino matches when reading cpio files.
This eliminates some false-positives in the hardlink detection logic.

MFC 201165 (kientzle):
Minor style fixes plus a fix for an obscure crash on certain malformed
mtree files.

MFC 201167 (kientzle):
If we're linking against liblzma, allow the decompressor to use up to
1<<30 bytes of memory, which is required for some streams.

Also, try to make the taster more discriminating about raw lzma streams.
The detection here is still really weak, though; please use xz instead
of lzma.

MFC 201168 (kientzle):
Zip write support for libarchive.

The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.

MFC 201169 (kientzle):
Clear extraneous error messages.

MFC 201170 (kientzle):
Essentially eliminate problems with false hardlinks in POSIX cpio
archives by generating synthetic ino values and mapping values
from disk into the new values.

MFC 201171 (kientzle):
Rationalize the support for cryptographic hashes.

MFC 201246 (kientzle):
Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader
from googlecode:
 * Support for zisofs compressed entries
 * Support for relocated deep directories
 * Direct calculation of link counts for accurate nlink values
   even on images that lack Rockridge extensions
 * Faster handling of the internal file lists.
 * Better detection of ISO variants

MFC 201247 (kientzle):
A raft of test changes and improvements from the Googlecode repository.
In particular, this includes tests for the new features I've merged
over the last few days.

MFC 201248 (kientzle):
UU decoder.  Now that libarchive can recursively taste input streams,
you can do things like this:  tar xvf archive.tar.gz.uu

MFC 201249 (kientzle):
Libarchive in FreeBSD is now synced up with 2.7.901a from
libarchive.googlecode.com

MFC 201250 (kientzle):
Reserve constants for RPM unwrapper and XAR reader.

MFC 201253 (kientzle):
Remove some test files that are no longer used.

MFC 202868 (kientzle):
Fix a memory leak when a filter fails to initialize.

MFC 202869 (kientzle):
Initialize the allocated 'struct zip'.

MFC 202871 (kientzle):
If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
be processed any further) and a suitable error string.
In particular, this improves the error-reporting when cpio -o is
given a nonexistent filename.

MFC 202872 (kientzle):
Use a simpler memory-management strategy for the file objects.
Instead of trying to reference-count them and free them as soon
as they are no longer needed, we now just keep them around and free
them all when we release the archive object.  This fixes a number
of minor memory leaks, especially when reading damaged archives.

MFC 202873 (kientzle):
Don't try to hardlink block or character device nodes that come out
of cpio archives.

MFC 203952 (uqs):
Add missing newline in last line of file.

Uncovered via:	fromcvs vs. svn

MFC 208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by:       mdocml lint run

MFC 208169 (kientzle):
Reorganize slightly in preparation for making lzma and bz2 support
conditional.

MFC 208184 (delphij):
Fix build.

MFC 208263 (kientzle):
Retry reads that fail with EINTR.  This fixes a problem
with bsdtar failing on SIGINT.

MFC 208291 (uqs):
mdoc: consistently spell our email addresses <foo@@FreeBSD.org>

MFC 210825 (joel):
Fix typo.

MFC 213573 (uqs):
mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd

MFC 214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

MFC 214867 (uqs):
Fix manpage markup.

MFC 214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to:	Gleb Kurtsou for sending me a sample archive

MFC 216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

MFC 221472 (obrien):
libarchive is mixing libmd and libcrypto -- correct to use one or the other.
[mixing the two can be quite bad -- they define the same context structures,
 but with differing structure members (and sizes)]

MFC 224152 (mm):
- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)
@
text
@d5 4
a16 1
	test_compat_cpio.c			\
a18 1
	test_compat_lzma.c			\
a44 1
	test_read_format_cpio_bin_lzma.c	\
a48 2
	test_read_format_cpio_svr4_bzip2_rpm.c	\
	test_read_format_cpio_svr4_gzip_rpm.c	\
a53 2
	test_read_format_iso_multi_extent.c	\
	test_read_format_isorr_rr_moved.c	\
a54 2
	test_read_format_isojoliet_long.c	\
	test_read_format_isojoliet_rr.c		\
a55 3
	test_read_format_isorr_ce.c		\
	test_read_format_isorr_new_bz2.c	\
	test_read_format_isozisofs_bz2.c	\
a62 1
	test_read_format_tlz.c			\
a64 1
	test_read_format_xar.c			\
a69 1
	test_read_uu.c				\
a84 1
	test_write_disk_symlink.c		\
a96 3
	test_write_format_zip.c			\
	test_write_format_zip_empty.c		\
	test_write_format_zip_no_compression.c	\
d100 2
a101 2
# Build the test program.
SRCS= \
d111 3
a113 3
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
d116 8
a123 1
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
d128 1
d132 1
a132 1
	./libarchive_test -r ${.CURDIR}
@


1.38.2.3
log
@SVN rev 224752 on 2011-08-10 08:40:59Z by mm

MFC r224691, r224700 [1]:

MFC r224961:
Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

In addition, merge following important bugfixes from
libarchive's release/2.8 branch:

Revision 2812:
Merge 2811 from trunk:  Don't try to verify that compression-level=0
produces larger results than the default compression, since this isn't
true for all versions of liblzma.

Revision 2817:
Merge 2814 from trunk: Fix Issue 121 (mtree parser error)
http://code.google.com/p/libarchive/issues/detail?id=121

Revision 2820:
Fix issue 119.
Change the file location check that a file location does not exceed
volume block. New one is that a file content does not exceed volume
block(end of an ISO image). It is better than previous check even
if the issue did not happen.

While reading an ISO image generated by an older version of mkisofs
utility, a file location indicates the end the ISO image if its file
size is zero and it is the last file of all files of the ISO image,
so it is possible that the location value is the same as the number
of the total block of the ISO image.

http://code.google.com/p/libarchive/issues/detail?id=119

Revision 2955:
Issue 134:  Fix libarchive 2.8 crashing in archive_write_finish() when
the open has failed and we're trying to write Zip format.

http://code.google.com/p/libarchive/issues/detail?id=134

Revision 2958:
Followup on Issue 134:
 1) Port test_open_failure to libarchive 2.8 branch to test
    the problem reported in Issue 134.
    This test also shows that archive_read_open() sometimes
    fails to report open errors correctly.
 2) Fix the bug in archive_read.c
 3) Comment out the tests that close functions are invoked
    promptly when open fails; that's fully fixed in libarchive 3.0,
    but I don't think it's worth fixing here.

Revision 3484:
Use uintmax_t with %ju

Revision 3487:
Fix issue 163.
Correctly allocate enough memory for a input buffer saved.

http://code.google.com/p/libarchive/issues/detail?id=163

Revision 3542:
Merge 2516, 2536 from trunk:  Allow path table offset values of
0 and 18, which are used by some ISO writers.

MFC r224700 [1]:
Merge revision 3554 from libarchive's release/2.8 branch:

Partial merge of 2431 from trunk:  Retry writes on EINTR.
This should fix the SIGINT handler in bsdtar.
Note:  The rest of r2431 can't be merged, since it interacts
with a big write-side rearchitecture.

PR:		bin/149409 [1]
Reviewed by:	kientzle
@
text
@a27 1
	test_open_failure.c			\
@


1.38.2.4
log
@SVN rev 229589 on 2012-01-05 11:45:22Z by mm

MFC r228744, r228745, r228748:

MFC r228744 [1]:
Merge vendor revision 3723:
Fixes extraction of Zip entries that use length-at-end without specifying
either the compressed or uncompressed length.  In particular, fixes bsdtar
extraction of such files.

Reported by:	Patrick Lamaiziere <patfbsd@@davenulle.org> (freebsd-stable@@)

MFC r228745:
Update libarchive, tar and cpio to version 2.8.5

The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from:	http://code.google.com/p/libarchive

MFC r228748:
Sync libarchive with vendor branch release/2.8:

3730:
Fix issue 174 (Windows path names, not relevant for FreeBSD)

3734:
Merge r1989: archive_clear_error should set errno to 0.

3735:
Merge r3247 from trunk: Clear errors before returning
from archive_read_support_format_all()

3799:
Check the position before dereferencing the pointer.
This avoids dereferencing one byte past the end of a string

3824:
Merge r3823 from trunk for issue 199 (hang in iso9660 reading)

Obtained from:	http://code.google.com/p/libarchive
@
text
@d55 1
a55 1
	test_read_format_iso_Z.c		\
@


1.38.2.5
log
@SVN rev 229596 on 2012-01-05 12:57:14Z by mm

MFC r228797:
Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.
@
text
@d3 2
a4 1
LIBARCHIVEDIR=	${.CURDIR}/../../../contrib/libarchive
a5 16
NO_MAN=yes

PROG=libarchive_test
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR}
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

# Uncomment to link against dmalloc
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC

.PATH:  ${LIBARCHIVEDIR}/libarchive/test
d123 15
d140 1
a140 1
	./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test
d144 1
a144 2
	(cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \
	grep DEFINE_TEST > ${.OBJDIR}/list.h
@


1.38.2.6
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/lib/libarchive/test/Makefile 229596 2012-01-05 12:57:14Z mm $
@


1.38.2.5.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.38.2.5.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/lib/libarchive/test/Makefile 229596 2012-01-05 12:57:14Z mm $
@


1.38.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.38.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.38.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.37
log
@SVN rev 191592 on 2009-04-27 19:30:09Z by kientzle

Merge r1061,r1062,r1063 from libarchive.googlecode.com:
Fix reading big-endian binary cpio archives, and add a test.
While I'm here, add a note about Solaris ACL extension for cpio,
which should be relatively straightforward to support.

Thanks to: Edward Napierala, who sent me a big-endian cpio archive
from a Solaris system he's been playing with.
Pointy hat: me
@
text
@d58 1
d122 2
a123 2
CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
LDADD+= -L/usr/local/lib -llzma
@


1.36
log
@SVN rev 191576 on 2009-04-27 18:27:54Z by kientzle

Merge r1053,r1055,r1056,r1057,r1065 from libarchive.googlecode.com:
 * Fix parsing of POSIX.1e ACLs from Solaris tar archives
 * Test the above
 * Preserve the order of POSIX.1e ACL entries
 * Update tests whose results depended on the order of ACL entries
 * Identify NFSv4 ACLs in Solaris tar archives and warn that
   they're not yet supported. (In particular, don't try to parse
   them as POSIX.1e ACLs.)

Thanks to: Edward Napierala sent me some Solaris 10 tar archives to test
@
text
@d42 1
@


1.35
log
@SVN rev 191183 on 2009-04-17 01:06:31Z by kientzle

Merge lots of test suite updates from libarchive.googlecode.com.
@
text
@d19 1
@


1.34
log
@SVN rev 189473 on 2009-03-07 02:09:21Z by kientzle

Merge r658 from libarchive.googlecode.com: Only flush and close the
file if it was actually opened.  Test for this case.
@
text
@d20 1
d28 3
d35 1
d43 1
d49 1
d52 1
d60 1
d71 3
d75 1
d88 1
d110 2
a111 2
LDADD= -lz -lbz2
CFLAGS+= -static -g
d114 8
d133 1
a133 1
	(cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h
d135 2
a136 1
CLEANFILES += *.out *.o *.core *~ list.h
@


1.33
log
@SVN rev 189431 on 2009-03-06 04:55:51Z by kientzle

Merge r416 from libarchive.googlecode.com:

Restoring POSIX.1e Extended Attributes on FreeBSD, part 1

This implements the basic ability to restore extended attributes
on FreeBSD, including a test suite.
@
text
@d32 1
@


1.32
log
@SVN rev 189429 on 2009-03-06 04:35:31Z by kientzle

Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590
from libarchive.googlecode.com:  Add a new "archive_read_disk" API
that provides the important service of reading metadata from the
disk.  In particular, this will make it possible to remove all
knowledge of extended attributes, ACLs, etc, from clients such
as bsdtar and bsdcpio.

Closely related, this API also provides pluggable uid->uname
and gid->gname lookup and caching services similar to
the uname->uid and gname->gid services provided by archive_write_disk.
Remember this is also required for correct ACL management.

Documentation is still pending...
@
text
@d24 1
@


1.31
log
@SVN rev 187704 on 2009-01-26 05:44:40Z by kientzle

Fix ARCHIVE_EXTRACT_SPARSE handling in libarchive.
Add a test to exercise this feature.
This should fix --sparse/-S support in tar.

Thanks to:      Daichi GOTO
MFC after:	1 week
@
text
@d29 1
@


1.30
log
@SVN rev 187521 on 2009-01-21 06:55:27Z by kientzle

Merge-from-Googlecode r419

In archive_write_disk:  If archive_write_header() fails to create
the file, that's a failure and should return ARCHIVE_FAILED.
Metadata restore failures still return ARCHIVE_WARN, because
that's non-critical.  Fix test_write_disk_secure test to
verify the correct return code in one case; add test_write_disk_failures
to do another very simple test of restore failure.

This should fix cpio coredumping when it tries to restore to
a write-protected directory.

Thanks to: Giorgos Keramidas
MFC after: 30 days
@
text
@d65 1
@


1.29
log
@SVN rev 185683 on 2008-12-06 07:08:08Z by kientzle

New tests:
 * support for bzip2 file with multiple concatenated bzip2 streams
 * support for bzip2 file with junk after bzip2 stream
 * support for gzip file with junk after gzip stream
 * "fuzz" tester randomly modifies a bunch of input files in order to try
   to crash libarchive (this found an amusing hang in the ISO9660 code
   when trying to read images that advertised a zero blocksize).

This test is implemented, but commented out for now:
 * support for gzip file with multiple concatenated gzip streams
@
text
@d61 1
@


1.28
log
@SVN rev 184038 on 2008-10-19 00:18:44Z by kientzle

Add test to verify ACL restores on FreeBSD, verify kern/128203 (mtime
restore fails if ACL provided), apply patch from kern/128203, and verify fix.

PR:		kern/128203
Submitted by:	Udo Schweigert
MFC after:	3 days
@
text
@d16 1
d18 1
d24 1
@


1.27
log
@SVN rev 183483 on 2008-09-30 04:02:36Z by kientzle

MfP4: restore birth time data to disk + more thorough tests for
time restore to disk.

MFC after:	30 days
@
text
@d12 1
@


1.26
log
@SVN rev 183482 on 2008-09-30 03:57:07Z by kientzle

MfP4: Store/read birthtime data in pax format.

Submitted by:	Pedro Giffuni
MFC after:	30 days
@
text
@d60 1
@


1.25
log
@SVN rev 182860 on 2008-09-08 00:58:12Z by kientzle

Fix a type-aliasing problem in the libarchive test suite,
restore WARNS=6.
@
text
@d65 1
@


1.24
log
@SVN rev 182149 on 2008-08-25 06:08:22Z by kientzle

Alphabetize the list of tests.
@
text
@d92 1
a92 1
#WARNS=6
@


1.23
log
@SVN rev 180029 on 2008-06-26 11:58:26Z by des

Some tests won't build at WARNS level 6 due to aliasing violations.
Add missing -I. so the tests will build when ${.OBJDIR} != ${.CURDIR}.
${.OBJDIR} does not need to be spelled out.
@
text
@d54 1
a55 1
	test_write_compress.c			\
d62 2
a64 2
	test_write_format_cpio_newc.c		\
	test_write_format_cpio_empty.c		\
d67 1
a68 1
	test_write_format_tar_empty.c		\
@


1.23.2.1
log
@SVN rev 181543 on 2008-08-10 21:18:59Z by kientzle

MFC libarchive 2.4.10, including test harness.
@
text
@a9 10
TESTFILES= \
	test_compat_gtar_1.tgz					\
	test_compat_zip_1.zip					\
	test_read_format_gtar_sparse_1_13.tgz			\
	test_read_format_gtar_sparse_1_17.tgz			\
	test_read_format_gtar_sparse_1_17_posix00.tgz		\
	test_read_format_gtar_sparse_1_17_posix01.tgz		\
	test_read_format_gtar_sparse_1_17_posix10.tgz		\
	test_read_format_gtar_sparse_1_17_posix10_modified.tar

d16 1
d21 2
d42 1
d53 1
d55 1
d57 1
d67 1
a78 2
CLEANFILES+= list.h archive.h

d87 1
a87 6
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${LA_SRCDIR}
# Without this, libarchive source files find archive.h in LA_SRCDIR,
# which may not be the same as archive.h in the test dir.
CFLAGS+= -I-
d90 3
a92 3
LDADD+= -L/usr/local/lib -ldmalloc
CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
WARNS=6
d95 2
a96 14
check test: libarchive_test ${TESTFILES}
	./libarchive_test

.for f in ${TESTFILES}
${f}: ${f}.uu
	uudecode -p ${.CURDIR}/${f}.uu >${f}
.endfor

INCS=archive.h list.h

# Build archive.h, but in our .OBJDIR, not libarchive's
# This keeps libarchive_test and libarchive builds completely separate.
archive.h: ${LA_SRCDIR}/archive.h.in ${LA_SRCDIR}/Makefile
	cd ${LA_SRCDIR} && unset MAKEOBJDIRPREFIX && MAKEOBJDIR=${.OBJDIR} make archive.h
d102 1
a102 1
CLEANFILES += *.out *.o *.core *~ list.h archive.h ${TESTFILES}
@


1.23.2.2
log
@SVN rev 181551 on 2008-08-10 21:45:52Z by kientzle

MFC r175423,175426-175428,175842-175843: Various improvements to hardlink
restore handling.
@
text
@a11 1
	test_compat_tar_hardlink_1.tar				\
a25 1
	test_compat_tar_hardlink.c		\
a60 1
	test_write_disk_hardlink.c		\
@


1.23.2.3
log
@SVN rev 181558 on 2008-08-11 01:50:00Z by kientzle

MFC r176401, r177084: Test harness improvements.
@
text
@d10 11
d107 7
a113 2
check test: libarchive_test
	./libarchive_test -k -r ${.CURDIR}
@


1.23.2.4
log
@SVN rev 181568 on 2008-08-11 02:20:24Z by kientzle

MFC r177183: compress write support, thanks to Joerg Sonnenberger.
@
text
@a50 1
	test_write_compress.c			\
@


1.23.2.5
log
@SVN rev 181574 on 2008-08-11 03:00:44Z by kientzle

MFC r177193, r177199:  If the locale of the filename on disk doesn't
match the locale in effect when the archiver is run, then attempts
to convert filenames to UTF-8 can fail and result in truncated filenames
in pax format archives.  Detect such failures and fall back on storing
the filename as a binary string in such cases.  Read the log message
for r177199 for more details about this problem.

On FreeBSD, using "C" locale is a good workaround.
@
text
@a20 1
	test_pax_filename_encoding.c		\
@


1.23.2.6
log
@SVN rev 181583 on 2008-08-11 05:03:44Z by kientzle

MFC r177200: GC an unused variable
@
text
@d112 1
a112 1
CLEANFILES += *.out *.o *.core *~ list.h archive.h
@


1.23.2.7
log
@SVN rev 181654 on 2008-08-13 03:27:33Z by kientzle

MFC r179321,179349,179790,179797,179801-179802

This brings in all of the updates from libarchive 2.5.4b plus
the most critical of the fixes from 2.5.5.  Note the internal
version is 1.9.25 to mark the fact that it still uses the
libarchive 1.x API in order to preserve API/ABI compatibility
with previous FreeBSD 6 releases.
@
text
@a20 1
	test_link_resolver.c			\
a40 1
	test_read_format_tar_empty_filename.c	\
a50 1
	test_ustar_filenames.c			\
a63 1
	test_write_format_tar_ustar.c		\
d71 1
a71 1
	${.OBJDIR}/list.h			\
d75 2
d85 2
d88 3
d99 8
a106 1
	./libarchive_test -v -r ${.CURDIR}
d109 1
a109 1
${.OBJDIR}/list.h: ${TESTS} Makefile
d112 1
a112 1
CLEANFILES += *.out *.o *.core *~ list.h
@


1.23.2.8
log
@SVN rev 181663 on 2008-08-13 04:33:31Z by kientzle

MFC r179798,179916,180026,180204,180209: Various test harness improvements
@
text
@d90 2
a91 2
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
@


1.23.2.9
log
@SVN rev 182241 on 2008-08-27 05:06:51Z by kientzle

MFC r180029,r182149: style fixes to the test makefile
@
text
@d54 1
a55 1
	test_write_compress_program.c		\
d62 2
a64 2
	test_write_format_cpio_newc.c		\
	test_write_format_cpio_odc.c		\
d67 1
a68 1
	test_write_format_tar_ustar.c		\
d75 1
a75 1
	list.h					\
d87 1
a87 1
CFLAGS+= -I${LA_SRCDIR} -I.
d92 1
a92 1
#WARNS=6
d99 1
a99 1
list.h: ${TESTS} Makefile
@


1.23.2.10
log
@SVN rev 184196 on 2008-10-23 04:50:06Z by kientzle

MFC r184038: Restore mtime *after* restoring ACLs.  Otherwise,
setting the ACL changes the mtime.  (Plus a new test to exercise
basic ACL restore logic.)

PR:		kern/128203
Submitted by:	Udo Schweigert
Approved by:	re (Kostik Belousov)
@
text
@a11 1
	test_acl_freebsd.c			\
@


1.23.2.11
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/lib/libarchive/test/Makefile 184196 2008-10-23 04:50:06Z kientzle $
@


1.23.2.9.2.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.23.2.9.2.2
log
@SVN rev 184197 on 2008-10-23 04:51:14Z by kientzle

MFC r184038: Restore mtime *after* restoring ACLs.  Otherwise,
setting the ACL changes the mtime.  (Plus a new test to exercise
basic ACL restore logic.)

PR:		kern/128203
Submitted by:	Udo Schweigert
Approved by:	re (Kostik Belousov)
@
text
@a11 1
	test_acl_freebsd.c			\
@


1.22
log
@SVN rev 180026 on 2008-06-26 10:53:05Z by des

Allow the tests to build without libdmalloc.
@
text
@d75 1
a75 1
	${.OBJDIR}/list.h			\
d87 1
a87 1
CFLAGS+= -I${LA_SRCDIR}
d92 1
a92 1
WARNS=6
d99 1
a99 1
${.OBJDIR}/list.h: ${TESTS} Makefile
@


1.21
log
@SVN rev 179790 on 2008-06-15 05:05:53Z by kientzle

archive.h is no longer constructed from archive.h.in,
so we can rename it and drop some no-longer-necessary
build magic from the Makefile.
@
text
@d90 2
a91 2
LDADD+= -L/usr/local/lib -ldmalloc
CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
@


1.20
log
@Until the old archive.h.in gets renamed to archive.h in the repository,
we still need some Makefile trickery to ensure archive.h is
correctly built for the test harness.
@
text
@a75 1
	${.OBJDIR}/archive.h			\
a97 5
# Build archive.h, but in our .OBJDIR, not libarchive's
# This keeps libarchive_test and libarchive builds completely separate.
${.OBJDIR}/archive.h: ${LA_SRCDIR}/archive.h.in ${LA_SRCDIR}/Makefile
	cd ${LA_SRCDIR} && unset MAKEOBJDIRPREFIX && MAKEOBJDIR=${.OBJDIR} make archive.h

@


1.19
log
@MFp4: libarchive 2.5.4b.  (Still 'b' until I get a bit more
feedback, but the 2.5 branch is shaping up nicely.)

In addition to many small bug fixes and code improvements:
 * Another iteration of versioning; I think I've got it right now.
 * Portability:  A lot of progress on Windows support (though I'm
   not committing all of the Windows support files to FreeBSD CVS)
 * Explicit tracking of MBS, WCS, and UTF-8 versions of strings
   in archive_entry; the archive_entry routines now correctly return
   NULL only when something is unset, setting NULL properly clears
   string values.  Most charset conversions have been pushed down to
   archive_string.
 * Better handling of charset conversion failure when writing or
   reading UTF-8 headers in pax archives
 * archive_entry_linkify() provides multiple strategies for
   hardlink matching to suit different format expectations
 * More accurate bzip2 format detection
 * Joerg Sonnenberger's extensive improvements to mtree support
 * Rough support for self-extracting ZIP archives.  Not an ideal
   approach, but it works for the archives I've tried.
 * New "sparsify" option in archive_write_disk converts blocks of nulls
   into seeks.
 * Better default behavior for the test harness; it now reports
   all failures by default instead of coredumping at the first one.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.18 2008/03/15 02:22:08 kientzle Exp $
d76 1
d99 5
@


1.18
log
@GC a reference to the defunct TESTFILES variable.
@
text
@d1 1
a1 1
# $FreeBSD$
d21 1
d42 1
d53 1
d67 1
d75 1
a75 1
	list.h					\
a78 2
CLEANFILES+= list.h archive.h

a86 2
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${.CURDIR}
a87 3
# Without this, libarchive source files find archive.h in LA_SRCDIR,
# which may not be the same as archive.h in the test dir.
CFLAGS+= -I-
d96 1
a96 8
	./libarchive_test -k -r ${.CURDIR}

INCS=archive.h list.h

# Build archive.h, but in our .OBJDIR, not libarchive's
# This keeps libarchive_test and libarchive builds completely separate.
archive.h: ${LA_SRCDIR}/archive.h.in ${LA_SRCDIR}/Makefile
	cd ${LA_SRCDIR} && unset MAKEOBJDIRPREFIX && MAKEOBJDIR=${.OBJDIR} make archive.h
d99 1
a99 1
list.h: ${TESTS} Makefile
d102 1
a102 1
CLEANFILES += *.out *.o *.core *~ list.h archive.h
@


1.17
log
@A subtle point: "pax interchange format" mandates that all strings
(including pathname, gname, uname) be stored in UTF-8.  This usually
doesn't cause problems on FreeBSD because the "C" locale on FreeBSD
can convert any byte to Unicode/wchar_t and from there to UTF-8.  In
other locales (including the "C" locale on Linux which is really
ASCII), you can get into trouble with pathnames that cannot be
converted to UTF-8.

Libarchive's pax writer truncated pathnames and other strings at the
first nonconvertible character.  (ouch!)  Other archivers have worked
around this by storing unconvertible pathnames as raw binary, a
practice which has been sanctioned by the Austin group.  However,
libarchive's pax reader would segfault reading headers that weren't
proper UTF-8.  (ouch!)  Since bsdtar defaults to pax format, this
affects bsdtar rather heavily.

To correctly support the new "hdrcharset" header that is going into
SUS and to handle conversion failures in general, libarchive's pax reader
and writer have been overhauled fairly extensively.  They used to do
most of the pax header processing using wchar_t (Unicode); they now do
most of it using char so that common logic applies to either UTF-8 or
"binary" strings.

As a bonus, a number of extraneous conversions to/from wchar_t have
been eliminated, which should speed things up just a tad.

Thanks to: Bjoern Jacke for originally reporting this to me
Thanks to: Joerg Sonnenberger for noting a bad typo in my first draft of this
Thanks to: Gunnar Ritter for getting the standard fixed
MFC after: 5 days
@
text
@d112 1
a112 1
CLEANFILES += *.out *.o *.core *~ list.h archive.h ${TESTFILES}
@


1.16
log
@Support for writing 'compress' format, thanks to Joerg Sonnenberger.
@
text
@d21 1
@


1.15
log
@Portability: Eliminate the need for uudecode by incorporating
uudecode into the main test driver and invoking it just-in-time
within the various tests.

Also, incorporate a number of improvements to the main test support
code that have proven useful on other projects where I've used this
framework.
@
text
@d51 1
@


1.14
log
@Add a test to verify compatibility with archives with
odd hardlinks.  I need to extend this to test pax extended
archives with bodies attached to hardlinks and other less-common cases.
@
text
@a9 11
TESTFILES= \
	test_compat_gtar_1.tgz					\
	test_compat_tar_hardlink_1.tar				\
	test_compat_zip_1.zip					\
	test_read_format_gtar_sparse_1_13.tgz			\
	test_read_format_gtar_sparse_1_17.tgz			\
	test_read_format_gtar_sparse_1_17_posix00.tgz		\
	test_read_format_gtar_sparse_1_17_posix01.tgz		\
	test_read_format_gtar_sparse_1_17_posix10.tgz		\
	test_read_format_gtar_sparse_1_17_posix10_modified.tar

d96 2
a97 7
check test: libarchive_test ${TESTFILES}
	./libarchive_test

.for f in ${TESTFILES}
${f}: ${f}.uu
	uudecode -p ${.CURDIR}/${f}.uu >${f}
.endfor
@


1.13
log
@Issues with hardlinks in newc-format files prompted me to
write a new test to exercise the hardlink strategies used
by different archive formats (tar, old cpio, new cpio).
This uncovered two problems, both fixed by this commit:

1) Enforce file size when writing files to disk.

2) When restoring hardlink entries, if they have data associated, go
   ahead and open the file so we can write the data.

In particular, this fixes bsdtar/bsdcpio extraction of new cpio
formats where the "original" is empty and the subsequent "hardlink"
entry actually carries the data.  It also provides correct behavior
for old cpio archives where hardlinked entries have their bodies
stored multiple times in the archive; the last body should always be
the one that ends up in the final file.  The new pax format also
permits (but does not require) hardlinks to carry file data; again,
the last contents should always win.

Note that with any of these, a size of zero on a hardlink simply means
that the hardlink carries no data; it does not mean that the file has
zero size.  A non-zero size on a hardlink does provide the file size.

Thanks to: John Baldwin, for reminding me about this long-standing bug
    and sending me a simple example archive that prompted this test case
@
text
@d12 1
d27 1
@


1.12
log
@Extensive improvements to the libarchive_test test program that
exercises and verifies the libarchive APIs:

* Improved error reporting; hexdumps are now provided for
  many file/memory content differences.
* Overall status more clearly counts "tests" and "assertions"
* Reference files can now be stored on disk instead of having
  to be compiled into the test program itself.  A couple of
  tests have been converted to this more natural structure.
* Several memory leaks corrected so that leaks within libarchive
  itself can be more easily detected and diagnosed.
* New test: GNU tar compatibility
* New test: Zip compatibility
* New test: Zero-byte writes to a compressed archive entry
* New test: archive_entry_strmode() format verification
* New test: mtree reader
* New test: write/read of large (2G - 1TB) entries to tar archives
  (thanks to recent performance work, this test only requires a few seconds)
* New test: detailed format verification of cpio odc and newc writers
* Many minor additions/improvements to existing tests as well.
@
text
@d61 1
@


1.11
log
@New test suite test_read_pax_truncated probes libarchive
behavior with truncated or damaged pax archives.  This
tests most of the cases covered by the recent security advisory.

Approved by: re (blanket, libarchive test suite)
@
text
@d3 17
d25 3
d29 1
d46 1
d58 1
d65 2
d73 4
a76 1
SRCS= ${TESTS}					\
d81 1
a81 1
CLEANFILES+= list.h
d86 4
a89 2
DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
LDADD= -larchive -lz -lbz2
d92 5
d99 19
a117 6
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
#WARNS=6

test:	libarchive_test
	./libarchive_test -k
d119 1
d123 3
a125 6
clean:
	rm -f *.out
	rm -f *.o
	rm -f *.core
	rm -f *~
	rm -f list.h
@


1.11.2.1
log
@MFC: libarchive 2.4.12
 * Formats are now only bid once per file, not once per entry
   (Affects archive_read.c, most format readers, internals manpage)
 * Correct tar/cpio history in libarchive_formats manpage
 * Avoid unnecessary copies in {write,read}_compression_none
   (significant performance boost for uncompressed archives!)
 * Protect against zero-length writes in gzip/bzip2 compressors
 * Tar reader: improve hardlink length heuristics, GNU tar --posix
   --sparse support, related fixes to SCHILY.realsize handling
 * Cpio reader: recover from sync errors
 * Cpio writer: pad symlinks properly in newc format
 * Ar writer: close out empty archive correctly
 * Zip reader: ignore PK00 header, code cleanups from des@@
 * Iso9660 reader: support device node entries
 * archive_write_disk: support hardlinks with bodies, enforce
    maximum file size
 * Reconnect progress callback from archive_read_extract()
 * New: archive_entry_strmode()
 * New: mtree reader
 * New: "linkresolver" makes it easier to do hardlink resolution
 * UUencode test reference files (be nice to CVS)
 * New test: exercise very large entries (2G up to 1T) in tar archives
 * New test: Detailed verification of cpio odc and newc formats
 * New test: Various strategies for restoring multiple links to a file
 * New tests: Various compatibility checks against gzip, zip, old tar, etc.
 * New test: cpio recovery from damaged archives
 * New test: mtree reading
 * Improved statistics reporting from test harness
 * Plus minor portability improvements
@
text
@a2 18
# Where to find the libarchive sources
LA_SRCDIR=${.CURDIR}/..
.PATH: ${LA_SRCDIR}

# Get a list of all libarchive source files
LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS

TESTFILES= \
	test_compat_gtar_1.tgz					\
	test_compat_tar_hardlink_1.tar				\
	test_compat_zip_1.zip					\
	test_read_format_gtar_sparse_1_13.tgz			\
	test_read_format_gtar_sparse_1_17.tgz			\
	test_read_format_gtar_sparse_1_17_posix00.tgz		\
	test_read_format_gtar_sparse_1_17_posix01.tgz		\
	test_read_format_gtar_sparse_1_17_posix10.tgz		\
	test_read_format_gtar_sparse_1_17_posix10_modified.tar

a7 4
	test_compat_gtar.c			\
	test_compat_tar_hardlink.c		\
	test_compat_zip.c			\
	test_empty_write.c			\
a8 1
	test_entry_strmode.c			\
a24 1
	test_read_format_mtree.c		\
a35 1
	test_tar_large.c			\
a37 1
	test_write_disk_hardlink.c		\
a41 2
	test_write_format_cpio_odc.c		\
	test_write_format_cpio_newc.c		\
d48 1
a48 4

# Build the test program using all libarchive sources + the test sources.
SRCS= ${LA_SRCS}				\
	${TESTS}				\
d53 1
a53 1
CLEANFILES+= list.h archive.h
d58 2
a59 4
INTERNALPROG=yes  # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ}
CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\"
LDADD= -lz -lbz2
a61 5
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${LA_SRCDIR}
# Without this, libarchive source files find archive.h in LA_SRCDIR,
# which may not be the same as archive.h in the test dir.
CFLAGS+= -I-
d64 6
a69 19
LDADD+= -L/usr/local/lib -ldmalloc
CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
WARNS=6

# Build libarchive_test and run it.
check test: libarchive_test ${TESTFILES}
	./libarchive_test

.for f in ${TESTFILES}
${f}: ${f}.uu
	uudecode -p ${.CURDIR}/${f}.uu >${f}
.endfor

INCS=archive.h list.h

# Build archive.h, but in our .OBJDIR, not libarchive's
# This keeps libarchive_test and libarchive builds completely separate.
archive.h: ${LA_SRCDIR}/archive.h.in ${LA_SRCDIR}/Makefile
	cd ${LA_SRCDIR} && unset MAKEOBJDIRPREFIX && MAKEOBJDIR=${.OBJDIR} make archive.h
a70 1
# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines
d74 6
a79 3
CLEANFILES += *.out *.o *.core *~ list.h archive.h ${TESTFILES}

cleantest:
@


1.11.2.2
log
@MFC:  Numerous test updates.
@
text
@d10 11
a31 1
	test_pax_filename_encoding.c		\
a61 1
	test_write_compress.c			\
d107 7
a113 2
check test: libarchive_test
	./libarchive_test -k -r ${.CURDIR}
d126 1
a126 1
CLEANFILES += *.out *.o *.core *~ list.h archive.h
@


1.11.2.3
log
@SVN rev 181490 on 2008-08-10 04:32:47Z by kientzle

Big MFC of libarchive 2.5.5.
@
text
@a20 1
	test_link_resolver.c			\
a40 1
	test_read_format_tar_empty_filename.c	\
a50 1
	test_ustar_filenames.c			\
a63 1
	test_write_format_tar_ustar.c		\
d71 1
a71 1
	${.OBJDIR}/list.h			\
d75 2
d85 2
d88 3
d99 8
a106 1
	./libarchive_test -v -r ${.CURDIR}
d109 1
a109 1
${.OBJDIR}/list.h: ${TESTS} Makefile
d112 1
a112 1
CLEANFILES += *.out *.o *.core *~ list.h
@


1.11.2.4
log
@SVN rev 181492 on 2008-08-10 05:30:28Z by kientzle

MFC various corrections to the test suite Makefile.
@
text
@d75 1
a75 1
	list.h					\
d87 1
a87 1
CFLAGS+= -I${LA_SRCDIR} -I.
d90 3
a92 3
#LDADD+= -L/usr/local/lib -ldmalloc
#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC
#WARNS=6
d99 1
a99 1
list.h: ${TESTS} Makefile
@


1.11.2.5
log
@SVN rev 182235 on 2008-08-27 04:46:47Z by kientzle

MFC r182149: Alphabetize the list of tests.
@
text
@d54 1
a55 1
	test_write_compress_program.c		\
d62 2
a64 2
	test_write_format_cpio_newc.c		\
	test_write_format_cpio_odc.c		\
d67 1
a68 1
	test_write_format_tar_ustar.c		\
@


1.11.2.6
log
@SVN rev 184195 on 2008-10-23 04:48:48Z by kientzle

MFC r184038: Restore mtime *after* restoring ACLs.  Otherwise,
setting the ACL changes the mtime.  (Plus a new test to exercise
basic ACL restore logic.)

PR:		kern/128203
Submitted by:	Udo Schweigert
Approved by:	re (Kostik Belousov)
@
text
@a11 1
	test_acl_freebsd.c			\
@


1.11.2.7
log
@SVN rev 188367 on 2009-02-09 03:31:53Z by kientzle

MFC r187704: Fix ARCHIVE_EXTRACT_SPARSE handling in libarchive.
Add a test to exercise this feature.
This should fix --sparse/-S support in tar.

Thanks to:      Daichi GOTO
@
text
@a60 1
	test_write_disk_sparse.c		\
@


1.11.2.8
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/lib/libarchive/test/Makefile 188367 2009-02-09 03:31:53Z kientzle $
@


1.11.2.7.6.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.11.2.7.6.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/lib/libarchive/test/Makefile 188367 2009-02-09 03:31:53Z kientzle $
@


1.11.2.7.4.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.11.2.7.2.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.11.2.6.2.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.10
log
@New file "read_open_memory.c" is a custom variant of
archive_read_open_memory.c that tries to test border
cases.  In particular, it copies over each returned block
so that formats or decompressors that read past the end
of a returned block will break.

Approved by: re (blanket, libarchive test suite)
@
text
@d32 1
@


1.9
log
@Ouch.  I partially screwed up the last commit by
enabling a test that's not ready yet. <sigh>

Pointy hat: /me
Approved by: re@@
@
text
@d49 2
a50 1
	main.c
@


1.8
log
@Support for writing the 'newc' cpio format, plus a minimal test harness
for the cpio formats.

Thanks to: Rudolf Marek
Approved by: re@@
@
text
@a32 1
	test_read_pax_truncated.c		\
@


1.7
log
@Read support for the new GNU tar sparse formats added in gtar 1.15 and
gtar 1.16.
@
text
@d33 1
d41 1
@


1.6
log
@Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
@
text
@d22 1
d66 1
a66 1
	./libarchive_test
@


1.5
log
@libarchive 2.2.3
  * "compression_program" support uses an external program
  * Portability: no longer uses "struct stat" as a primary
    data interchange structure internally
  * Part of the above: refactor archive_entry to separate
    out copy_stat() and stat() functions
  * More complete tests for archive_entry
  * Finish archive_entry_clone()
  * Isolate major()/minor()/makedev() in archive_entry; remove
    these from everywhere else.
  * Bug fix: properly handle decompression look-ahead at end-of-data
  * Bug fixes to 'ar' support
  * Fix memory leak in ZIP reader
  * Portability: better timegm() emulation in iso9660 reader
  * New write_disk flags to suppress auto dir creation and not
    overwrite newer files (for future cpio front-end)
  * Simplify trailing-'/' fixup when writing tar and pax
  * Test enhancements:  fix various compiler warnings, improve
    portability, add lots of new tests.
  * Documentation: document new functions, first draft of
    libarchive_internals.3

MFC after: 14 days
Thanks to: Joerg Sonnenberger (compression_program)
Thanks to: Kai Wang (ar)
Thanks to: Colin Percival (many small fixes)
Thanks to: Many others who sent me various patches and problem reports.
@
text
@a50 1
MK_MAN=no
@


1.4
log
@Conventionally, tar archives have always included a trailing '/'
for directories.  bsdtar used to add this, but that recently got
lost somehow.  So now I'm adding it back in libarchive.
The only odd part of doing this in libarchive:  Adding a directory to
a tar archive and then reading it back again can yield a different name.

Add a test case to exercise some boundary conditions with
tar filenames and ensure that trailing slashes are added to
dir names only as necessary.

Thanks to: Oliver Lehmann for bringing this regression to my attention.
@
text
@d8 2
d34 1
d60 5
@


1.3
log
@Enable 'ar' support; hook it up to the build and
enable it with _read_support_format_all().
@
text
@d31 1
@


1.2
log
@New tests for system-independent ACL support.
These tests verify that archive_entry objects can store and return
ACL data and that pax format archives can read and write ACL
information.  These do not (yet) test that ACL data is read or
written to disk correctly.  (And hence would not have caught the
recent snafu about ACL read-from-disk being turned off.)
@
text
@d10 1
d34 1
d71 1
a71 1
.include <bsd.prog.mk>@


1.1
log
@libarchive 2.0
  * libarchive_test program exercises many of the core features
  * Refactored old "read_extract" into new "archive_write_disk", which
    uses archive_write methods to put entries onto disk.  In particular,
    you can now use archive_write_disk to create objects on disk
    without having an archive available.
  * Pushed some security checks from bsdtar down into libarchive, where
    they can be better optimized.
  * Rearchitected the logic for creating objects on disk to reduce
    the number of system calls.  Several common cases now use a
    minimum number of system calls.
  * Virtualized some internal interfaces to provide a clearer separation
    of read and write handling and make it simpler to override key
    methods.
  * New "empty" format reader.
  * Corrected return types (this ABI breakage required the "2.0" version bump)
  * Many bug fixes.
@
text
@d4 2
@

