head	1.116;
access;
symbols
	RELENG_8_4:1.116.0.2
	RELENG_9_1_0_RELEASE:1.108.2.2.2.2
	RELENG_9_1:1.108.2.2.0.2
	RELENG_9_1_BP:1.108.2.2
	RELENG_8_3_0_RELEASE:1.98.2.5.2.1
	RELENG_8_3:1.98.2.5.0.2
	RELENG_8_3_BP:1.98.2.5
	RELENG_9_0_0_RELEASE:1.108.2.1.2.1
	RELENG_9_0:1.108.2.1.0.2
	RELENG_9_0_BP:1.108.2.1
	RELENG_9:1.108.0.2
	RELENG_9_BP:1.108
	RELENG_7_4_0_RELEASE:1.77.2.3.8.1
	RELENG_8_2_0_RELEASE:1.98.2.3.2.1
	RELENG_7_4:1.77.2.3.0.8
	RELENG_7_4_BP:1.77.2.3
	RELENG_8_2:1.98.2.3.0.2
	RELENG_8_2_BP:1.98.2.3
	RELENG_8_1_0_RELEASE:1.98.2.1.4.1
	RELENG_8_1:1.98.2.1.0.4
	RELENG_8_1_BP:1.98.2.1
	RELENG_7_3_0_RELEASE:1.77.2.3.6.1
	RELENG_7_3:1.77.2.3.0.6
	RELENG_7_3_BP:1.77.2.3
	RELENG_8_0_0_RELEASE:1.98.2.1.2.1
	RELENG_8_0:1.98.2.1.0.2
	RELENG_8_0_BP:1.98.2.1
	RELENG_8:1.98.0.2
	RELENG_8_BP:1.98
	RELENG_7_2_0_RELEASE:1.77.2.3.4.1
	RELENG_7_2:1.77.2.3.0.4
	RELENG_7_2_BP:1.77.2.3
	RELENG_7_1_0_RELEASE:1.77.2.3.2.1
	RELENG_6_4_0_RELEASE:1.36.2.16.2.1
	RELENG_7_1:1.77.2.3.0.2
	RELENG_7_1_BP:1.77.2.3
	RELENG_6_4:1.36.2.16.0.2
	RELENG_6_4_BP:1.36.2.16
	RELENG_7_0_0_RELEASE:1.77
	RELENG_6_3_0_RELEASE:1.36.2.10
	RELENG_7_0:1.77.0.4
	RELENG_7_0_BP:1.77
	RELENG_6_3:1.36.2.10.0.2
	RELENG_6_3_BP:1.36.2.10
	RELENG_7:1.77.0.2
	RELENG_7_BP:1.77
	RELENG_6_2_0_RELEASE:1.36.2.2
	RELENG_6_2:1.36.2.2.0.2
	RELENG_6_2_BP:1.36.2.2
	RELENG_5_5_0_RELEASE:1.20.2.7
	RELENG_5_5:1.20.2.7.0.2
	RELENG_5_5_BP:1.20.2.7
	RELENG_6_1_0_RELEASE:1.36.2.1
	RELENG_6_1:1.36.2.1.0.4
	RELENG_6_1_BP:1.36.2.1
	RELENG_6_0_0_RELEASE:1.36.2.1
	RELENG_6_0:1.36.2.1.0.2
	RELENG_6_0_BP:1.36.2.1
	RELENG_6:1.36.0.2
	RELENG_6_BP:1.36
	RELENG_5_4_0_RELEASE:1.20.2.3
	RELENG_5_4:1.20.2.3.0.2
	RELENG_5_4_BP:1.20.2.3
	RELENG_5_3_0_RELEASE:1.20.2.1
	RELENG_5_3:1.20.2.1.0.2
	RELENG_5_3_BP:1.20.2.1
	RELENG_5:1.20.0.2
	RELENG_5_BP:1.20;
locks; strict;
comment	@# @;


1.116
date	2013.03.23.02.24.59;	author svnexp;	state Exp;
branches
	1.116.2.1;
next	1.115;

1.115
date	2013.01.24.00.43.26;	author svnexp;	state Exp;
branches;
next	1.114;

1.114
date	2012.11.17.01.49.20;	author svnexp;	state Exp;
branches;
next	1.113;

1.113
date	2012.07.30.14.47.35;	author mm;	state Exp;
branches;
next	1.112;

1.112
date	2012.07.28.06.38.44;	author mm;	state Exp;
branches;
next	1.111;

1.111
date	2012.03.23.11.18.07;	author dim;	state Exp;
branches;
next	1.110;

1.110
date	2012.02.25.10.58.02;	author mm;	state Exp;
branches;
next	1.109;

1.109
date	2011.12.22.08.42.07;	author mm;	state Exp;
branches;
next	1.108;

1.108
date	2011.07.17.21.27.38;	author mm;	state Exp;
branches
	1.108.2.1;
next	1.107;

1.107
date	2011.05.05.01.16.06;	author obrien;	state Exp;
branches;
next	1.106;

1.106
date	2010.05.17.07.06.54;	author delphij;	state Exp;
branches;
next	1.105;

1.105
date	2010.05.16.20.43.17;	author kientzle;	state Exp;
branches;
next	1.104;

1.104
date	2010.05.10.15.28.44;	author mm;	state Exp;
branches;
next	1.103;

1.103
date	2010.01.02.09.58.07;	author ed;	state Exp;
branches;
next	1.102;

1.102
date	2009.12.30.06.12.03;	author kientzle;	state Exp;
branches;
next	1.101;

1.101
date	2009.12.29.06.15.32;	author kientzle;	state Exp;
branches;
next	1.100;

1.100
date	2009.12.28.02.58.14;	author kientzle;	state Exp;
branches;
next	1.99;

1.99
date	2009.12.28.02.41.27;	author kientzle;	state Exp;
branches;
next	1.98;

1.98
date	2009.07.19.17.25.24;	author kensmith;	state Exp;
branches
	1.98.2.1;
next	1.97;

1.97
date	2009.05.30.17.26.55;	author kientzle;	state Exp;
branches;
next	1.96;

1.96
date	2009.05.30.07.08.16;	author kientzle;	state Exp;
branches;
next	1.95;

1.95
date	2009.04.27.22.39.43;	author kientzle;	state Exp;
branches;
next	1.94;

1.94
date	2009.04.27.20.23.22;	author kientzle;	state Exp;
branches;
next	1.93;

1.93
date	2009.04.27.20.09.05;	author kientzle;	state Exp;
branches;
next	1.92;

1.92
date	2009.04.18.06.06.47;	author kientzle;	state Exp;
branches;
next	1.91;

1.91
date	2009.04.17.00.54.35;	author kientzle;	state Exp;
branches;
next	1.90;

1.90
date	2009.04.12.05.04.02;	author kientzle;	state Exp;
branches;
next	1.89;

1.89
date	2009.03.06.04.35.31;	author kientzle;	state Exp;
branches;
next	1.88;

1.88
date	2008.08.31.07.21.46;	author kientzle;	state Exp;
branches;
next	1.87;

1.87
date	2008.08.24.05.54.28;	author kientzle;	state Exp;
branches;
next	1.86;

1.86
date	2008.08.24.05.42.22;	author kientzle;	state Exp;
branches;
next	1.85;

1.85
date	2008.06.15.05.05.53;	author kientzle;	state Exp;
branches;
next	1.84;

1.84
date	2008.05.26.17.00.22;	author kientzle;	state Exp;
branches;
next	1.83;

1.83
date	2008.03.21.11.10.20;	author kaiw;	state Exp;
branches;
next	1.82;

1.82
date	2008.03.14.23.00.53;	author kientzle;	state Exp;
branches;
next	1.81;

1.81
date	2008.03.14.20.35.37;	author kientzle;	state Exp;
branches;
next	1.80;

1.80
date	2008.01.23.05.48.07;	author kientzle;	state Exp;
branches;
next	1.79;

1.79
date	2008.01.01.06.17.05;	author kientzle;	state Exp;
branches;
next	1.78;

1.78
date	2007.12.30.04.58.21;	author kientzle;	state Exp;
branches;
next	1.77;

1.77
date	2007.07.15.19.10.34;	author kientzle;	state Exp;
branches
	1.77.2.1;
next	1.76;

1.76
date	2007.07.12.15.00.28;	author cperciva;	state Exp;
branches;
next	1.75;

1.75
date	2007.07.07.16.55.42;	author kientzle;	state Exp;
branches;
next	1.74;

1.74
date	2007.07.06.15.36.37;	author kientzle;	state Exp;
branches;
next	1.73;

1.73
date	2007.06.22.05.47.00;	author kientzle;	state Exp;
branches;
next	1.72;

1.72
date	2007.05.29.01.00.18;	author kientzle;	state Exp;
branches;
next	1.71;

1.71
date	2007.05.02.05.29.55;	author cperciva;	state Exp;
branches;
next	1.70;

1.70
date	2007.04.15.00.53.38;	author kientzle;	state Exp;
branches;
next	1.69;

1.69
date	2007.04.14.22.34.10;	author kientzle;	state Exp;
branches;
next	1.68;

1.68
date	2007.04.14.18.24.42;	author kientzle;	state Exp;
branches;
next	1.67;

1.67
date	2007.04.14.08.42.50;	author kientzle;	state Exp;
branches;
next	1.66;

1.66
date	2007.04.14.08.20.30;	author kientzle;	state Exp;
branches;
next	1.65;

1.65
date	2007.04.12.04.44.21;	author kientzle;	state Exp;
branches;
next	1.64;

1.64
date	2007.04.07.05.54.23;	author kientzle;	state Exp;
branches;
next	1.63;

1.63
date	2007.04.05.15.51.19;	author cperciva;	state Exp;
branches;
next	1.62;

1.62
date	2007.03.24.05.02.15;	author kientzle;	state Exp;
branches;
next	1.61;

1.61
date	2007.03.13.06.04.24;	author kientzle;	state Exp;
branches;
next	1.60;

1.60
date	2007.03.11.10.29.52;	author kientzle;	state Exp;
branches;
next	1.59;

1.59
date	2007.03.03.07.37.35;	author kientzle;	state Exp;
branches;
next	1.58;

1.58
date	2007.02.01.06.18.16;	author kientzle;	state Exp;
branches;
next	1.57;

1.57
date	2006.11.26.19.09.42;	author kientzle;	state Exp;
branches;
next	1.56;

1.56
date	2006.11.26.19.00.49;	author kientzle;	state Exp;
branches;
next	1.55;

1.55
date	2006.11.26.05.39.28;	author kientzle;	state Exp;
branches;
next	1.54;

1.54
date	2006.11.24.16.35.54;	author kientzle;	state Exp;
branches;
next	1.53;

1.53
date	2006.11.20.16.48.04;	author kientzle;	state Exp;
branches;
next	1.52;

1.52
date	2006.11.06.00.28.46;	author kientzle;	state Exp;
branches;
next	1.51;

1.51
date	2006.11.06.00.24.57;	author kientzle;	state Exp;
branches;
next	1.50;

1.50
date	2006.09.05.05.59.45;	author kientzle;	state Exp;
branches;
next	1.49;

1.49
date	2006.05.01.01.02.19;	author kientzle;	state Exp;
branches;
next	1.48;

1.48
date	2006.03.21.16.55.46;	author kientzle;	state Exp;
branches;
next	1.47;

1.47
date	2006.03.11.23.59.43;	author kientzle;	state Exp;
branches;
next	1.46;

1.46
date	2006.03.08.01.56.06;	author kientzle;	state Exp;
branches;
next	1.45;

1.45
date	2006.01.26.05.28.56;	author kientzle;	state Exp;
branches;
next	1.44;

1.44
date	2006.01.18.06.26.42;	author kientzle;	state Exp;
branches;
next	1.43;

1.43
date	2006.01.17.03.40.42;	author kientzle;	state Exp;
branches;
next	1.42;

1.42
date	2005.11.10.18.07.05;	author ru;	state Exp;
branches;
next	1.41;

1.41
date	2005.10.14.16.32.50;	author kientzle;	state Exp;
branches;
next	1.40;

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

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

1.38
date	2005.09.10.22.58.06;	author kientzle;	state Exp;
branches;
next	1.37;

1.37
date	2005.07.22.17.18.59;	author kensmith;	state Exp;
branches;
next	1.36;

1.36
date	2005.06.04.22.30.36;	author kientzle;	state Exp;
branches
	1.36.2.1;
next	1.35;

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

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

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

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

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

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

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

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

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

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

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

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

1.23
date	2004.10.11.22.04.05;	author obrien;	state Exp;
branches;
next	1.22;

1.22
date	2004.09.01.05.07.17;	author kientzle;	state Exp;
branches;
next	1.21;

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

1.20
date	2004.08.14.03.45.45;	author kientzle;	state Exp;
branches
	1.20.2.1;
next	1.19;

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

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

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

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

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

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

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

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

1.11
date	2004.05.27.23.57.45;	author kientzle;	state Exp;
branches;
next	1.10;

1.10
date	2004.05.14.13.31.19;	author cognet;	state Exp;
branches;
next	1.9;

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

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

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

1.6
date	2004.04.12.01.16.16;	author kientzle;	state Exp;
branches;
next	1.5;

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

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

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

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

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

1.116.2.1
date	2013.03.23.02.24.59;	author svnexp;	state dead;
branches;
next	1.116.2.2;

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

1.108.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.108.2.1.2.1;
next	1.108.2.2;

1.108.2.2
date	2012.01.05.12.52.05;	author mm;	state Exp;
branches
	1.108.2.2.2.1;
next	1.108.2.3;

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

1.108.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.108.2.1.2.2;

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

1.108.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.108.2.2.2.2;

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

1.98.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.98.2.1.2.1
	1.98.2.1.4.1;
next	1.98.2.2;

1.98.2.2
date	2010.10.10.08.41.08;	author mm;	state Exp;
branches;
next	1.98.2.3;

1.98.2.3
date	2010.11.13.06.07.39;	author kientzle;	state Exp;
branches
	1.98.2.3.2.1;
next	1.98.2.4;

1.98.2.4
date	2011.08.01.07.59.02;	author mm;	state Exp;
branches;
next	1.98.2.5;

1.98.2.5
date	2012.01.05.12.57.14;	author mm;	state Exp;
branches
	1.98.2.5.2.1;
next	1.98.2.6;

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

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

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

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

1.98.2.5.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.98.2.5.2.2;

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

1.77.2.1
date	2008.02.11.00.31.06;	author kientzle;	state Exp;
branches;
next	1.77.2.2;

1.77.2.2
date	2008.05.21.04.14.10;	author kientzle;	state Exp;
branches;
next	1.77.2.3;

1.77.2.3
date	2008.08.10.04.32.47;	author kientzle;	state Exp;
branches
	1.77.2.3.2.1
	1.77.2.3.4.1
	1.77.2.3.6.1
	1.77.2.3.8.1;
next	1.77.2.4;

1.77.2.4
date	2012.11.17.08.01.46;	author svnexp;	state Exp;
branches;
next	;

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

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

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

1.77.2.3.8.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.77.2.3.8.2;

1.77.2.3.8.2
date	2012.11.17.08.16.40;	author svnexp;	state Exp;
branches;
next	;

1.36.2.1
date	2005.07.22.17.29.03;	author kensmith;	state Exp;
branches;
next	1.36.2.2;

1.36.2.2
date	2006.07.30.06.30.00;	author kientzle;	state Exp;
branches;
next	1.36.2.3;

1.36.2.3
date	2007.01.27.06.44.52;	author kientzle;	state Exp;
branches;
next	1.36.2.4;

1.36.2.4
date	2007.02.14.08.29.35;	author kientzle;	state Exp;
branches;
next	1.36.2.5;

1.36.2.5
date	2007.07.05.01.56.39;	author kientzle;	state Exp;
branches;
next	1.36.2.6;

1.36.2.6
date	2007.07.07.16.59.11;	author kientzle;	state Exp;
branches;
next	1.36.2.7;

1.36.2.7
date	2007.07.12.15.00.44;	author cperciva;	state Exp;
branches;
next	1.36.2.8;

1.36.2.8
date	2007.07.18.04.57.32;	author kientzle;	state Exp;
branches;
next	1.36.2.9;

1.36.2.9
date	2007.07.19.14.31.52;	author kientzle;	state Exp;
branches;
next	1.36.2.10;

1.36.2.10
date	2007.08.25.03.49.12;	author kientzle;	state Exp;
branches;
next	1.36.2.11;

1.36.2.11
date	2008.08.10.21.18.59;	author kientzle;	state Exp;
branches;
next	1.36.2.12;

1.36.2.12
date	2008.08.10.21.51.42;	author kientzle;	state Exp;
branches;
next	1.36.2.13;

1.36.2.13
date	2008.08.11.02.20.24;	author kientzle;	state Exp;
branches;
next	1.36.2.14;

1.36.2.14
date	2008.08.11.02.51.42;	author kientzle;	state Exp;
branches;
next	1.36.2.15;

1.36.2.15
date	2008.08.11.05.12.28;	author kientzle;	state Exp;
branches;
next	1.36.2.16;

1.36.2.16
date	2008.08.13.03.27.33;	author kientzle;	state Exp;
branches
	1.36.2.16.2.1;
next	1.36.2.17;

1.36.2.17
date	2012.11.17.07.39.31;	author svnexp;	state Exp;
branches;
next	;

1.36.2.16.2.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.20.2.1
date	2004.09.09.05.42.22;	author kientzle;	state Exp;
branches;
next	1.20.2.2;

1.20.2.2
date	2004.12.22.00.01.55;	author kientzle;	state Exp;
branches;
next	1.20.2.3;

1.20.2.3
date	2005.02.25.05.10.23;	author kientzle;	state Exp;
branches;
next	1.20.2.4;

1.20.2.4
date	2005.05.16.02.54.04;	author kientzle;	state Exp;
branches;
next	1.20.2.5;

1.20.2.5
date	2005.05.16.04.37.59;	author kientzle;	state Exp;
branches;
next	1.20.2.6;

1.20.2.6
date	2005.10.04.05.39.39;	author kientzle;	state Exp;
branches;
next	1.20.2.7;

1.20.2.7
date	2005.10.14.16.06.35;	author kientzle;	state Exp;
branches;
next	;


desc
@@


1.116
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/Makefile 248616 2013-03-22 13:36:03Z mm $
.include <bsd.own.mk>

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

LIB=	archive
DPADD=	${LIBZ}
LDADD=	-lz

DPADD+= ${LIBBZ2}
LDADD+= -lbz2
CFLAGS+= -DHAVE_BZLIB_H=1

DPADD+= ${LIBLZMA}
LDADD+= -llzma
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

DPADD+= ${LIBBSDXML}
LDADD+= -lbsdxml

# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
SHLIB_MAJOR= 6

CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
CFLAGS+=	-I${.OBJDIR}

.if ${MK_OPENSSL} != "no"
CFLAGS+=	-DWITH_OPENSSL
DPADD+=	${LIBCRYPTO}
LDADD+=	-lcrypto
.else
DPADD+=	${LIBMD}
LDADD+=	-lmd
.endif

.if ${MK_ICONV} != "no"
CFLAGS+=	-DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
.endif

.if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \
	${MACHINE_ARCH:Msparc64*} != "" || ${MACHINE_ARCH:Mia64*} != ""
NO_WCAST_ALIGN=	yes
.if ${MACHINE_ARCH:M*64*} == ""
CFLAGS+=	-DPPMD_32BIT
.endif
.endif
NO_WCAST_ALIGN.clang=

.PATH: ${LIBARCHIVEDIR}/libarchive

# Headers to be installed in /usr/include
INCS=	archive.h archive_entry.h

# Sources to be compiled.
SRCS=	archive_acl.c					\
	archive_check_magic.c				\
	archive_cmdline.c				\
	archive_crypto.c				\
	archive_entry.c					\
	archive_entry_copy_stat.c			\
	archive_entry_link_resolver.c			\
	archive_entry_sparse.c				\
	archive_entry_stat.c				\
	archive_entry_strmode.c				\
	archive_entry_xattr.c				\
	archive_getdate.c				\
	archive_match.c					\
	archive_options.c				\
	archive_pathmatch.c				\
	archive_ppmd7.c					\
	archive_rb.c					\
	archive_read.c					\
	archive_read_append_filter.c			\
	archive_read_data_into_fd.c			\
	archive_read_disk_entry_from_file.c		\
	archive_read_disk_posix.c			\
	archive_read_disk_set_standard_lookup.c		\
	archive_read_extract.c				\
	archive_read_open_fd.c				\
	archive_read_open_file.c			\
	archive_read_open_filename.c			\
	archive_read_open_memory.c			\
	archive_read_set_format.c			\
	archive_read_set_options.c			\
	archive_read_support_filter_all.c		\
	archive_read_support_filter_bzip2.c		\
	archive_read_support_filter_compress.c		\
	archive_read_support_filter_gzip.c		\
	archive_read_support_filter_grzip.c		\
	archive_read_support_filter_lrzip.c		\
	archive_read_support_filter_lzop.c		\
	archive_read_support_filter_none.c		\
	archive_read_support_filter_program.c		\
	archive_read_support_filter_rpm.c		\
	archive_read_support_filter_uu.c		\
	archive_read_support_filter_xz.c		\
	archive_read_support_format_7zip.c		\
	archive_read_support_format_all.c		\
	archive_read_support_format_ar.c		\
	archive_read_support_format_by_code.c		\
	archive_read_support_format_cab.c		\
	archive_read_support_format_cpio.c		\
	archive_read_support_format_empty.c		\
	archive_read_support_format_iso9660.c		\
	archive_read_support_format_lha.c		\
	archive_read_support_format_mtree.c		\
	archive_read_support_format_rar.c		\
	archive_read_support_format_raw.c		\
	archive_read_support_format_tar.c		\
	archive_read_support_format_xar.c		\
	archive_read_support_format_zip.c		\
	archive_string.c				\
	archive_string_sprintf.c			\
	archive_util.c					\
	archive_virtual.c				\
	archive_write.c					\
	archive_write_add_filter.c			\
	archive_write_disk_acl.c			\
	archive_write_disk_set_standard_lookup.c	\
	archive_write_disk_posix.c			\
	archive_write_open_fd.c				\
	archive_write_open_file.c			\
	archive_write_open_filename.c			\
	archive_write_open_memory.c			\
	archive_write_add_filter_b64encode.c		\
	archive_write_add_filter_by_name.c		\
	archive_write_add_filter_bzip2.c		\
	archive_write_add_filter_compress.c		\
	archive_write_add_filter_grzip.c		\
	archive_write_add_filter_gzip.c			\
	archive_write_add_filter_lrzip.c		\
	archive_write_add_filter_lzop.c			\
	archive_write_add_filter_none.c			\
	archive_write_add_filter_program.c		\
	archive_write_add_filter_uuencode.c		\
	archive_write_add_filter_xz.c			\
	archive_write_set_format.c			\
	archive_write_set_format_7zip.c			\
	archive_write_set_format_ar.c			\
	archive_write_set_format_by_name.c		\
	archive_write_set_format_cpio.c			\
	archive_write_set_format_cpio_newc.c		\
	archive_write_set_format_gnutar.c		\
	archive_write_set_format_iso9660.c		\
	archive_write_set_format_mtree.c		\
	archive_write_set_format_pax.c			\
	archive_write_set_format_shar.c			\
	archive_write_set_format_ustar.c		\
	archive_write_set_format_v7tar.c		\
	archive_write_set_format_xar.c			\
	archive_write_set_format_zip.c			\
	archive_write_set_options.c			\
	filter_fork_posix.c

# Man pages to be installed.
MAN=	archive_entry.3					\
	archive_entry_acl.3				\
	archive_entry_linkify.3				\
	archive_entry_paths.3				\
	archive_entry_perms.3				\
	archive_entry_stat.3				\
	archive_entry_time.3				\
	archive_read.3					\
	archive_read_data.3				\
	archive_read_disk.3				\
	archive_read_extract.3				\
	archive_read_filter.3				\
	archive_read_format.3				\
	archive_read_free.3				\
	archive_read_header.3				\
	archive_read_new.3				\
	archive_read_open.3				\
	archive_read_set_options.3			\
	archive_util.3					\
	archive_write.3					\
	archive_write_blocksize.3			\
	archive_write_data.3				\
	archive_write_disk.3				\
	archive_write_filter.3				\
	archive_write_finish_entry.3			\
	archive_write_format.3				\
	archive_write_free.3				\
	archive_write_header.3				\
	archive_write_new.3				\
	archive_write_open.3				\
	archive_write_set_options.3			\
	cpio.5						\
	libarchive.3					\
	libarchive_changes.3				\
	libarchive_internals.3				\
	libarchive-formats.5				\
	tar.5

# Symlink the man pages under each function name.
MLINKS+=	archive_entry.3 archive_entry_clear.3
MLINKS+=	archive_entry.3 archive_entry_clone.3
MLINKS+=	archive_entry.3 archive_entry_free.3
MLINKS+=	archive_entry.3 archive_entry_new.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_add_entry.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_add_entry_w.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_clear.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_count.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_next.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_next_w.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_reset.3
MLINKS+=	archive_entry_acl.3 archive_entry_acl_text_w.3
MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver.3
MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_new.3
MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_set_strategy.3
MLINKS+=	archive_entry_linkify.3 archive_entry_linkresolver_free.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_hardlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_hardlink_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_link.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_link_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_pathname.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_pathname_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_sourcepath.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_symlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_copy_symlink_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_hardlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_hardlink_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_pathname.3
MLINKS+=	archive_entry_paths.3 archive_entry_pathname_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_set_hardlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_set_link.3
MLINKS+=	archive_entry_paths.3 archive_entry_set_pathname.3
MLINKS+=	archive_entry_paths.3 archive_entry_set_symlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_symlink.3
MLINKS+=	archive_entry_paths.3 archive_entry_symlink_w.3
MLINKS+=	archive_entry_paths.3 archive_entry_update_symlink_utf8.3
MLINKS+=	archive_entry_paths.3 archive_entry_update_hardlink_utf8.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_fflags_text.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_fflags_text_w.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_gname.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_gname_w.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_uname.3
MLINKS+=	archive_entry_perms.3 archive_entry_copy_uname_w.3
MLINKS+=	archive_entry_perms.3 archive_entry_fflags.3
MLINKS+=	archive_entry_perms.3 archive_entry_fflags_text.3
MLINKS+=	archive_entry_perms.3 archive_entry_gid.3
MLINKS+=	archive_entry_perms.3 archive_entry_gname.3
MLINKS+=	archive_entry_perms.3 archive_entry_gname_w.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_fflags.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_gid.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_gname.3
MLINKS+=	archive_entry_perms.3 archive_entry_perm.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_perm.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_uid.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_uname.3
MLINKS+=	archive_entry_perms.3 archive_entry_strmode.3
MLINKS+=	archive_entry_perms.3 archive_entry_uid.3
MLINKS+=	archive_entry_perms.3 archive_entry_uname.3
MLINKS+=	archive_entry_perms.3 archive_entry_uname_w.3
MLINKS+=	archive_entry_perms.3 archive_entry_update_gname_utf8.3
MLINKS+=	archive_entry_perms.3 archive_entry_update_uname_utf8.3
MLINKS+=	archive_entry_stat.3 archive_entry_copy_stat.3
MLINKS+=	archive_entry_stat.3 archive_entry_dev.3
MLINKS+=	archive_entry_stat.3 archive_entry_dev_is_set.3
MLINKS+=	archive_entry_stat.3 archive_entry_devmajor.3
MLINKS+=	archive_entry_stat.3 archive_entry_devminor.3
MLINKS+=	archive_entry_stat.3 archive_entry_filetype.3
MLINKS+=	archive_entry_stat.3 archive_entry_ino.3
MLINKS+=	archive_entry_stat.3 archive_entry_ino64.3
MLINKS+=	archive_entry_stat.3 archive_entry_ino_is_set.3
MLINKS+=	archive_entry_stat.3 archive_entry_mode.3
MLINKS+=	archive_entry_stat.3 archive_entry_nlink.3
MLINKS+=	archive_entry_stat.3 archive_entry_rdev.3
MLINKS+=	archive_entry_stat.3 archive_entry_rdevmajor.3
MLINKS+=	archive_entry_stat.3 archive_entry_rdevminor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_dev.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_devmajor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_devminor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_filetype.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_ino.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_ino64.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_mode.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_nlink.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdev.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevmajor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevminor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_size.3
MLINKS+=	archive_entry_stat.3 archive_entry_size.3
MLINKS+=	archive_entry_stat.3 archive_entry_size_is_set.3
MLINKS+=	archive_entry_stat.3 archive_entry_unset_size.3
MLINKS+=	archive_entry_time.3 archive_entry_atime.3
MLINKS+=	archive_entry_time.3 archive_entry_atime_is_set.3
MLINKS+=	archive_entry_time.3 archive_entry_atime_nsec.3
MLINKS+=	archive_entry_time.3 archive_entry_birthtime.3
MLINKS+=	archive_entry_time.3 archive_entry_birthtime_is_set.3
MLINKS+=	archive_entry_time.3 archive_entry_birthtime_nsec.3
MLINKS+=	archive_entry_time.3 archive_entry_ctime.3
MLINKS+=	archive_entry_time.3 archive_entry_ctime_is_set.3
MLINKS+=	archive_entry_time.3 archive_entry_ctime_nsec.3
MLINKS+=	archive_entry_time.3 archive_entry_mtime.3
MLINKS+=	archive_entry_time.3 archive_entry_mtime_is_set.3
MLINKS+=	archive_entry_time.3 archive_entry_mtime_nsec.3
MLINKS+=	archive_entry_time.3 archive_entry_set_atime.3
MLINKS+=	archive_entry_time.3 archive_entry_set_birthtime.3
MLINKS+=	archive_entry_time.3 archive_entry_set_ctime.3
MLINKS+=	archive_entry_time.3 archive_entry_set_mtime.3
MLINKS+=	archive_entry_time.3 archive_entry_unset_atime.3
MLINKS+=	archive_entry_time.3 archive_entry_unset_birthtime.3
MLINKS+=	archive_entry_time.3 archive_entry_unset_ctime.3
MLINKS+=	archive_entry_time.3 archive_entry_unset_mtime.3
MLINKS+=	archive_read_data.3 archive_read_data_block.3
MLINKS+=	archive_read_data.3 archive_read_data_into_fd.3
MLINKS+=	archive_read_data.3 archive_read_data_skip.3
MLINKS+=	archive_read_header.3 archive_read_next_header.3
MLINKS+=	archive_read_header.3 archive_read_next_header2.3
MLINKS+=	archive_read_extract.3 archive_read_extract2.3
MLINKS+=	archive_read_extract.3 archive_read_extract_set_progress_callback.3
MLINKS+=	archive_read_extract.3 archive_read_extract_set_skip_file.3
MLINKS+=	archive_read_open.3 archive_read_open2.3
MLINKS+=	archive_read_open.3 archive_read_open_FILE.3
MLINKS+=	archive_read_open.3 archive_read_open_fd.3
MLINKS+=	archive_read_open.3 archive_read_open_file.3
MLINKS+=	archive_read_open.3 archive_read_open_filename.3
MLINKS+=	archive_read_open.3 archive_read_open_memory.3
MLINKS+=	archive_read_free.3 archive_read_close.3
MLINKS+=	archive_read_free.3 archive_read_finish.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_all.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_bzip2.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_compress.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_gzip.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_lzma.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_none.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_xz.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_program.3
MLINKS+=	archive_read_filter.3 archive_read_support_filter_program_signature.3
MLINKS+=	archive_read_format.3 archive_read_support_format_7zip.3
MLINKS+=	archive_read_format.3 archive_read_support_format_all.3
MLINKS+=	archive_read_format.3 archive_read_support_format_ar.3
MLINKS+=	archive_read_format.3 archive_read_support_format_by_code.3
MLINKS+=	archive_read_format.3 archive_read_support_format_cab.3
MLINKS+=	archive_read_format.3 archive_read_support_format_cpio.3
MLINKS+=	archive_read_format.3 archive_read_support_format_empty.3
MLINKS+=	archive_read_format.3 archive_read_support_format_iso9660.3
MLINKS+=	archive_read_format.3 archive_read_support_format_lha.3
MLINKS+=	archive_read_format.3 archive_read_support_format_mtree.3
MLINKS+=	archive_read_format.3 archive_read_support_format_rar.3
MLINKS+=	archive_read_format.3 archive_read_support_format_raw.3
MLINKS+=	archive_read_format.3 archive_read_support_format_tar.3
MLINKS+=	archive_read_format.3 archive_read_support_format_xar.3
MLINKS+=	archive_read_format.3 archive_read_support_format_zip.3
MLINKS+=	archive_read_disk.3 archive_read_disk_entry_from_file.3
MLINKS+=	archive_read_disk.3 archive_read_disk_gname.3
MLINKS+=	archive_read_disk.3 archive_read_disk_new.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_gname_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_standard_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_hybrid.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_logical.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_physical.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_uname_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_uname.3
MLINKS+=	archive_read_set_options.3 archive_read_set_filter_option.3
MLINKS+=	archive_read_set_options.3 archive_read_set_format_option.3
MLINKS+=	archive_read_set_options.3 archive_read_set_option.3
MLINKS+=	archive_util.3 archive_clear_error.3
MLINKS+=	archive_util.3 archive_compression.3
MLINKS+=	archive_util.3 archive_compression_name.3
MLINKS+=	archive_util.3 archive_copy_error.3
MLINKS+=	archive_util.3 archive_errno.3
MLINKS+=	archive_util.3 archive_error_string.3
MLINKS+=	archive_util.3 archive_file_count.3
MLINKS+=	archive_util.3 archive_filter_code.3
MLINKS+=	archive_util.3 archive_filter_count.3
MLINKS+=	archive_util.3 archive_filter_name.3
MLINKS+=	archive_util.3 archive_format.3
MLINKS+=	archive_util.3 archive_format_name.3
MLINKS+=	archive_util.3 archive_position.3
MLINKS+=	archive_util.3 archive_set_error.3
MLINKS+=	archive_write_blocksize.3 archive_write_get_bytes_in_last_block.3
MLINKS+=	archive_write_blocksize.3 archive_write_get_bytes_per_block.3
MLINKS+=	archive_write_blocksize.3 archive_write_set_bytes_in_last_block.3
MLINKS+=	archive_write_blocksize.3 archive_write_set_bytes_per_block.3
MLINKS+=	archive_write_disk.3 archive_write_data_block.3
MLINKS+=	archive_write_disk.3 archive_write_disk_new.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_group_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_options.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_skip_file.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_standard_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_user_lookup.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_bzip2.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_compress.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_gzip.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_lzip.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_lzma.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_none.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_program.3
MLINKS+=	archive_write_filter.3 archive_write_add_filter_xz.3
MLINKS+=	archive_write_format.3 archive_write_set_format_cpio.3
MLINKS+=	archive_write_format.3 archive_write_set_format_pax.3
MLINKS+=	archive_write_format.3 archive_write_set_format_pax_restricted.3
MLINKS+=	archive_write_format.3 archive_write_set_format_shar.3
MLINKS+=	archive_write_format.3 archive_write_set_format_shar_dump.3
MLINKS+=	archive_write_format.3 archive_write_set_format_ustar.3
MLINKS+=	archive_write_free.3 archive_write_close.3
MLINKS+=	archive_write_free.3 archive_write_fail.3
MLINKS+=	archive_write_free.3 archive_write_finish.3
MLINKS+=	archive_write_open.3 archive_write_open_FILE.3
MLINKS+=	archive_write_open.3 archive_write_open_fd.3
MLINKS+=	archive_write_open.3 archive_write_open_file.3
MLINKS+=	archive_write_open.3 archive_write_open_filename.3
MLINKS+=	archive_write_open.3 archive_write_open_memory.3
MLINKS+=	archive_write_set_options.3 archive_write_set_filter_option.3
MLINKS+=	archive_write_set_options.3 archive_write_set_format_option.3
MLINKS+=	archive_write_set_options.3 archive_write_set_option.3
MLINKS+=	libarchive.3 archive.3

.PHONY: check test clean-test
check test:
	cd ${.CURDIR}/test && make obj && make test

clean-test:
	cd ${.CURDIR}/test && make clean

.include <bsd.lib.mk>
@


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


1.116.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 287
# $FreeBSD: releng/8.4/lib/libarchive/Makefile 229596 2012-01-05 12:57:14Z mm $
.include <bsd.own.mk>

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

LIB=	archive
DPADD=	${LIBZ}
LDADD=	-lz

DPADD+=	${LIBBZ2}
LDADD+=	-lbz2
CFLAGS+= -DHAVE_BZLIB_H=1

DPADD+=	${LIBLZMA}
LDADD+=	-llzma
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1

DPADD+= ${LIBBSDXML}
LDADD+= -lbsdxml

# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
SHLIB_MAJOR= 5

CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
CFLAGS+=	-I${.OBJDIR}

.if ${MK_OPENSSL} != "no"
CFLAGS+=	-DWITH_OPENSSL
DPADD+=	${LIBCRYPTO}
LDADD+=	-lcrypto
.else
DPADD+=	${LIBMD}
LDADD+=	-lmd
.endif

.PATH: ${LIBARCHIVEDIR}/libarchive

# Headers to be installed in /usr/include
INCS=	archive.h archive_entry.h

# Sources to be compiled.
SRCS=	archive_check_magic.c				\
	archive_entry.c					\
	archive_entry_copy_stat.c			\
	archive_entry_stat.c				\
	archive_entry_strmode.c				\
	archive_entry_link_resolver.c			\
	archive_entry_xattr.c				\
	archive_read.c					\
	archive_read_data_into_fd.c			\
	archive_read_disk.c				\
	archive_read_disk_entry_from_file.c		\
	archive_read_disk_set_standard_lookup.c		\
	archive_read_extract.c				\
	archive_read_open_fd.c				\
	archive_read_open_file.c			\
	archive_read_open_filename.c			\
	archive_read_open_memory.c			\
	archive_read_support_compression_all.c		\
	archive_read_support_compression_bzip2.c	\
	archive_read_support_compression_compress.c	\
	archive_read_support_compression_gzip.c		\
	archive_read_support_compression_none.c		\
	archive_read_support_compression_program.c	\
	archive_read_support_compression_rpm.c		\
	archive_read_support_compression_uu.c		\
	archive_read_support_compression_xz.c		\
	archive_read_support_format_all.c		\
	archive_read_support_format_ar.c		\
	archive_read_support_format_cpio.c		\
	archive_read_support_format_empty.c		\
	archive_read_support_format_iso9660.c		\
	archive_read_support_format_mtree.c		\
	archive_read_support_format_raw.c		\
	archive_read_support_format_tar.c		\
	archive_read_support_format_xar.c		\
	archive_read_support_format_zip.c		\
	archive_string.c				\
	archive_string_sprintf.c			\
	archive_util.c					\
	archive_virtual.c				\
	archive_write.c					\
	archive_write_disk.c				\
	archive_write_disk_set_standard_lookup.c	\
	archive_write_open_fd.c				\
	archive_write_open_file.c			\
	archive_write_open_filename.c			\
	archive_write_open_memory.c			\
	archive_write_set_compression_bzip2.c		\
	archive_write_set_compression_compress.c	\
	archive_write_set_compression_gzip.c		\
	archive_write_set_compression_none.c		\
	archive_write_set_compression_program.c		\
	archive_write_set_compression_xz.c		\
	archive_write_set_format.c			\
	archive_write_set_format_ar.c			\
	archive_write_set_format_by_name.c		\
	archive_write_set_format_cpio.c			\
	archive_write_set_format_cpio_newc.c		\
	archive_write_set_format_mtree.c		\
	archive_write_set_format_pax.c			\
	archive_write_set_format_shar.c			\
	archive_write_set_format_ustar.c		\
	archive_write_set_format_zip.c			\
	filter_fork.c

# Man pages to be installed.
MAN=	archive_entry.3					\
	archive_read.3					\
	archive_read_disk.3				\
	archive_util.3					\
	archive_write.3					\
	archive_write_disk.3				\
	cpio.5						\
	libarchive.3					\
	libarchive-formats.5				\
	tar.5

# Symlink the man pages under each function name.
MLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
MLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_clear.3
MLINKS+=	archive_entry.3 archive_entry_acl_count.3
MLINKS+=	archive_entry.3 archive_entry_acl_next.3
MLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_reset.3
MLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
MLINKS+=	archive_entry.3 archive_entry_clear.3
MLINKS+=	archive_entry.3 archive_entry_clone.3
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_gname.3
MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_link.3
MLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_uname.3
MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
MLINKS+=	archive_entry.3 archive_entry_dev.3
MLINKS+=	archive_entry.3 archive_entry_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_devminor.3
MLINKS+=	archive_entry.3 archive_entry_filetype.3
MLINKS+=	archive_entry.3 archive_entry_fflags.3
MLINKS+=	archive_entry.3 archive_entry_fflags_text.3
MLINKS+=	archive_entry.3 archive_entry_free.3
MLINKS+=	archive_entry.3 archive_entry_gid.3
MLINKS+=	archive_entry.3 archive_entry_gname.3
MLINKS+=	archive_entry.3 archive_entry_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_ino.3
MLINKS+=	archive_entry.3 archive_entry_mode.3
MLINKS+=	archive_entry.3 archive_entry_mtime.3
MLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
MLINKS+=	archive_entry.3 archive_entry_nlink.3
MLINKS+=	archive_entry.3 archive_entry_new.3
MLINKS+=	archive_entry.3 archive_entry_pathname.3
MLINKS+=	archive_entry.3 archive_entry_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_rdev.3
MLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_atime.3
MLINKS+=	archive_entry.3 archive_entry_set_ctime.3
MLINKS+=	archive_entry.3 archive_entry_set_dev.3
MLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_devminor.3
MLINKS+=	archive_entry.3 archive_entry_set_fflags.3
MLINKS+=	archive_entry.3 archive_entry_set_gid.3
MLINKS+=	archive_entry.3 archive_entry_set_gname.3
MLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_set_link.3
MLINKS+=	archive_entry.3 archive_entry_set_mode.3
MLINKS+=	archive_entry.3 archive_entry_set_mtime.3
MLINKS+=	archive_entry.3 archive_entry_set_nlink.3
MLINKS+=	archive_entry.3 archive_entry_set_pathname.3
MLINKS+=	archive_entry.3 archive_entry_set_rdev.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_size.3
MLINKS+=	archive_entry.3 archive_entry_set_symlink.3
MLINKS+=	archive_entry.3 archive_entry_set_uid.3
MLINKS+=	archive_entry.3 archive_entry_set_uname.3
MLINKS+=	archive_entry.3 archive_entry_size.3
MLINKS+=	archive_entry.3 archive_entry_stat.3
MLINKS+=	archive_entry.3 archive_entry_symlink.3
MLINKS+=	archive_entry.3 archive_entry_uid.3
MLINKS+=	archive_entry.3 archive_entry_uname.3
MLINKS+=	archive_entry.3 archive_entry_uname_w.3
MLINKS+=	archive_read.3 archive_read_data.3
MLINKS+=	archive_read.3 archive_read_data_block.3
MLINKS+=	archive_read.3 archive_read_data_into_buffer.3
MLINKS+=	archive_read.3 archive_read_data_into_fd.3
MLINKS+=	archive_read.3 archive_read_data_skip.3
MLINKS+=	archive_read.3 archive_read_extract.3
MLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
MLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
MLINKS+=	archive_read.3 archive_read_finish.3
MLINKS+=	archive_read.3 archive_read_new.3
MLINKS+=	archive_read.3 archive_read_next_header.3
MLINKS+=	archive_read.3 archive_read_next_header2.3
MLINKS+=	archive_read.3 archive_read_open.3
MLINKS+=	archive_read.3 archive_read_open2.3
MLINKS+=	archive_read.3 archive_read_open_FILE.3
MLINKS+=	archive_read.3 archive_read_open_fd.3
MLINKS+=	archive_read.3 archive_read_open_file.3
MLINKS+=	archive_read.3 archive_read_open_filename.3
MLINKS+=	archive_read.3 archive_read_open_memory.3
MLINKS+=	archive_read.3 archive_read_support_compression_all.3
MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
MLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
MLINKS+=	archive_read.3 archive_read_support_compression_lzma.3
MLINKS+=	archive_read.3 archive_read_support_compression_none.3
MLINKS+=	archive_read.3 archive_read_support_compression_program.3
MLINKS+=	archive_read.3 archive_read_support_compression_program_signature.3
MLINKS+=	archive_read.3 archive_read_support_compression_xz.3
MLINKS+=	archive_read.3 archive_read_support_format_all.3
MLINKS+=	archive_read.3 archive_read_support_format_ar.3
MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
MLINKS+=	archive_read.3 archive_read_support_format_empty.3
MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
MLINKS+=	archive_read.3 archive_read_support_format_raw.3
MLINKS+=	archive_read.3 archive_read_support_format_tar.3
MLINKS+=	archive_read.3 archive_read_support_format_zip.3
MLINKS+=	archive_read_disk.3 archive_read_disk_entry_from_file.3
MLINKS+=	archive_read_disk.3 archive_read_disk_gname.3
MLINKS+=	archive_read_disk.3 archive_read_disk_new.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_gname_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_standard_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_hybrid.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_logical.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_symlink_physical.3
MLINKS+=	archive_read_disk.3 archive_read_disk_set_uname_lookup.3
MLINKS+=	archive_read_disk.3 archive_read_disk_uname.3
MLINKS+=	archive_util.3 archive_clear_error.3
MLINKS+=	archive_util.3 archive_compression.3
MLINKS+=	archive_util.3 archive_compression_name.3
MLINKS+=	archive_util.3 archive_errno.3
MLINKS+=	archive_util.3 archive_error_string.3
MLINKS+=	archive_util.3 archive_file_count.3
MLINKS+=	archive_util.3 archive_format.3
MLINKS+=	archive_util.3 archive_format_name.3
MLINKS+=	archive_util.3 archive_set_error.3
MLINKS+=	archive_write.3 archive_write_close.3
MLINKS+=	archive_write.3 archive_write_data.3
MLINKS+=	archive_write.3 archive_write_finish.3
MLINKS+=	archive_write.3 archive_write_finish_entry.3
MLINKS+=	archive_write.3 archive_write_get_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
MLINKS+=	archive_write.3 archive_write_header.3
MLINKS+=	archive_write.3 archive_write_new.3
MLINKS+=	archive_write.3 archive_write_open.3
MLINKS+=	archive_write.3 archive_write_open_FILE.3
MLINKS+=	archive_write.3 archive_write_open_fd.3
MLINKS+=	archive_write.3 archive_write_open_file.3
MLINKS+=	archive_write.3 archive_write_open_filename.3
MLINKS+=	archive_write.3 archive_write_open_memory.3
MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
MLINKS+=	archive_write.3 archive_write_set_callbacks.3
MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
MLINKS+=	archive_write.3 archive_write_set_compression_compress.3
MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
MLINKS+=	archive_write.3 archive_write_set_compression_none.3
MLINKS+=	archive_write.3 archive_write_set_compression_program.3
MLINKS+=	archive_write.3 archive_write_set_format_pax.3
MLINKS+=	archive_write.3 archive_write_set_format_shar.3
MLINKS+=	archive_write.3 archive_write_set_format_ustar.3
MLINKS+=	archive_write_disk.3 archive_write_disk_new.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_group_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_options.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_skip_file.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_standard_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_user_lookup.3
MLINKS+=	libarchive.3 archive.3

.PHONY: check test clean-test
check test:
	cd ${.CURDIR}/test && make obj && make test

clean-test:
	cd ${.CURDIR}/test && make clean

.include <bsd.lib.mk>
@


1.115
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/245854
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libarchive/Makefile 245854 2013-01-23 23:53:26Z brooks $
d58 1
d74 1
d84 1
d90 3
d126 2
d130 1
d132 2
d136 1
d150 1
d154 1
a154 1
	filter_fork.c
d190 1
d399 1
@


1.114
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/lib/libarchive/Makefile 238909 2012-07-30 14:47:35Z mm $
a233 3
MLINKS+=	archive_entry_perms.3 archive_entry_set_fflags.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_gid.3
MLINKS+=	archive_entry_perms.3 archive_entry_set_gname.3
a263 4
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdev.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevmajor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_rdevminor.3
MLINKS+=	archive_entry_stat.3 archive_entry_set_size.3
@


1.113
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.112
log
@SVN rev 238856 on 2012-07-28 06:38:44Z by mm

Update libarchive to 3.0.4
@
text
@d113 1
@


1.111
log
@SVN rev 233352 on 2012-03-23 11:18:07Z by dim

Silence alignment warnings from clang in libarchive's ppmd code (which
is actually third-party code).  Clang even warns about alignment issues
on x86, and the warnings are not needed there.
@
text
@d66 2
d69 1
d112 1
@


1.110
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
@d48 1
@


1.109
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
@d23 1
a23 1
SHLIB_MAJOR= 5
d37 12
d55 3
a57 1
SRCS=	archive_check_magic.c				\
d60 2
a63 1
	archive_entry_link_resolver.c			\
d65 3
a69 1
	archive_read_disk.c				\
d71 1
d78 11
a88 9
	archive_read_support_compression_all.c		\
	archive_read_support_compression_bzip2.c	\
	archive_read_support_compression_compress.c	\
	archive_read_support_compression_gzip.c		\
	archive_read_support_compression_none.c		\
	archive_read_support_compression_program.c	\
	archive_read_support_compression_rpm.c		\
	archive_read_support_compression_uu.c		\
	archive_read_support_compression_xz.c		\
d91 2
d96 1
d98 1
a107 1
	archive_write_disk.c				\
d109 1
d114 6
a119 6
	archive_write_set_compression_bzip2.c		\
	archive_write_set_compression_compress.c	\
	archive_write_set_compression_gzip.c		\
	archive_write_set_compression_none.c		\
	archive_write_set_compression_program.c		\
	archive_write_set_compression_xz.c		\
d121 1
d126 2
d132 1
d134 1
d139 6
d146 1
d148 8
d158 2
d161 8
d171 1
a175 8
MLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
MLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_clear.3
MLINKS+=	archive_entry.3 archive_entry_acl_count.3
MLINKS+=	archive_entry.3 archive_entry_acl_next.3
MLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_reset.3
MLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
a177 18
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_gname.3
MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_link.3
MLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_uname.3
MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
MLINKS+=	archive_entry.3 archive_entry_dev.3
MLINKS+=	archive_entry.3 archive_entry_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_devminor.3
MLINKS+=	archive_entry.3 archive_entry_filetype.3
MLINKS+=	archive_entry.3 archive_entry_fflags.3
MLINKS+=	archive_entry.3 archive_entry_fflags_text.3
a178 9
MLINKS+=	archive_entry.3 archive_entry_gid.3
MLINKS+=	archive_entry.3 archive_entry_gname.3
MLINKS+=	archive_entry.3 archive_entry_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_ino.3
MLINKS+=	archive_entry.3 archive_entry_mode.3
MLINKS+=	archive_entry.3 archive_entry_mtime.3
MLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
MLINKS+=	archive_entry.3 archive_entry_nlink.3
d180 153
a332 68
MLINKS+=	archive_entry.3 archive_entry_pathname.3
MLINKS+=	archive_entry.3 archive_entry_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_rdev.3
MLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_atime.3
MLINKS+=	archive_entry.3 archive_entry_set_ctime.3
MLINKS+=	archive_entry.3 archive_entry_set_dev.3
MLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_devminor.3
MLINKS+=	archive_entry.3 archive_entry_set_fflags.3
MLINKS+=	archive_entry.3 archive_entry_set_gid.3
MLINKS+=	archive_entry.3 archive_entry_set_gname.3
MLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_set_link.3
MLINKS+=	archive_entry.3 archive_entry_set_mode.3
MLINKS+=	archive_entry.3 archive_entry_set_mtime.3
MLINKS+=	archive_entry.3 archive_entry_set_nlink.3
MLINKS+=	archive_entry.3 archive_entry_set_pathname.3
MLINKS+=	archive_entry.3 archive_entry_set_rdev.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_size.3
MLINKS+=	archive_entry.3 archive_entry_set_symlink.3
MLINKS+=	archive_entry.3 archive_entry_set_uid.3
MLINKS+=	archive_entry.3 archive_entry_set_uname.3
MLINKS+=	archive_entry.3 archive_entry_size.3
MLINKS+=	archive_entry.3 archive_entry_stat.3
MLINKS+=	archive_entry.3 archive_entry_symlink.3
MLINKS+=	archive_entry.3 archive_entry_uid.3
MLINKS+=	archive_entry.3 archive_entry_uname.3
MLINKS+=	archive_entry.3 archive_entry_uname_w.3
MLINKS+=	archive_read.3 archive_read_data.3
MLINKS+=	archive_read.3 archive_read_data_block.3
MLINKS+=	archive_read.3 archive_read_data_into_buffer.3
MLINKS+=	archive_read.3 archive_read_data_into_fd.3
MLINKS+=	archive_read.3 archive_read_data_skip.3
MLINKS+=	archive_read.3 archive_read_extract.3
MLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
MLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
MLINKS+=	archive_read.3 archive_read_finish.3
MLINKS+=	archive_read.3 archive_read_new.3
MLINKS+=	archive_read.3 archive_read_next_header.3
MLINKS+=	archive_read.3 archive_read_next_header2.3
MLINKS+=	archive_read.3 archive_read_open.3
MLINKS+=	archive_read.3 archive_read_open2.3
MLINKS+=	archive_read.3 archive_read_open_FILE.3
MLINKS+=	archive_read.3 archive_read_open_fd.3
MLINKS+=	archive_read.3 archive_read_open_file.3
MLINKS+=	archive_read.3 archive_read_open_filename.3
MLINKS+=	archive_read.3 archive_read_open_memory.3
MLINKS+=	archive_read.3 archive_read_support_compression_all.3
MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
MLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
MLINKS+=	archive_read.3 archive_read_support_compression_lzma.3
MLINKS+=	archive_read.3 archive_read_support_compression_none.3
MLINKS+=	archive_read.3 archive_read_support_compression_program.3
MLINKS+=	archive_read.3 archive_read_support_compression_program_signature.3
MLINKS+=	archive_read.3 archive_read_support_compression_xz.3
MLINKS+=	archive_read.3 archive_read_support_format_all.3
MLINKS+=	archive_read.3 archive_read_support_format_ar.3
MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
MLINKS+=	archive_read.3 archive_read_support_format_empty.3
MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
MLINKS+=	archive_read.3 archive_read_support_format_raw.3
MLINKS+=	archive_read.3 archive_read_support_format_tar.3
MLINKS+=	archive_read.3 archive_read_support_format_zip.3
d343 3
d349 1
d353 3
d358 1
d360 5
a364 25
MLINKS+=	archive_write.3 archive_write_close.3
MLINKS+=	archive_write.3 archive_write_data.3
MLINKS+=	archive_write.3 archive_write_finish.3
MLINKS+=	archive_write.3 archive_write_finish_entry.3
MLINKS+=	archive_write.3 archive_write_get_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
MLINKS+=	archive_write.3 archive_write_header.3
MLINKS+=	archive_write.3 archive_write_new.3
MLINKS+=	archive_write.3 archive_write_open.3
MLINKS+=	archive_write.3 archive_write_open_FILE.3
MLINKS+=	archive_write.3 archive_write_open_fd.3
MLINKS+=	archive_write.3 archive_write_open_file.3
MLINKS+=	archive_write.3 archive_write_open_filename.3
MLINKS+=	archive_write.3 archive_write_open_memory.3
MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
MLINKS+=	archive_write.3 archive_write_set_callbacks.3
MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
MLINKS+=	archive_write.3 archive_write_set_compression_compress.3
MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
MLINKS+=	archive_write.3 archive_write_set_compression_none.3
MLINKS+=	archive_write.3 archive_write_set_compression_program.3
MLINKS+=	archive_write.3 archive_write_set_format_pax.3
MLINKS+=	archive_write.3 archive_write_set_format_shar.3
MLINKS+=	archive_write.3 archive_write_set_format_ustar.3
d371 24
@


1.108
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
@d4 2
d25 1
a25 1
CFLAGS+=	-DPLATFORM_CONFIG_H=\"config_freebsd.h\"
d37 2
d280 1
a280 1
.PHONY: check test
d282 4
a285 1
	cd ${.CURDIR}/test && make test
@


1.108.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.108.2.2
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
@a3 2
LIBARCHIVEDIR=	${.CURDIR}/../../contrib/libarchive

d23 1
a23 1
CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
a34 2
.PATH: ${LIBARCHIVEDIR}/libarchive

d276 1
a276 1
.PHONY: check test clean-test
d278 1
a278 4
	cd ${.CURDIR}/test && make obj && make test

clean-test:
	cd ${.CURDIR}/test && make clean
@


1.108.2.3
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/Makefile 229595 2012-01-05 12:52:05Z mm $
@


1.108.2.2.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.108.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/lib/libarchive/Makefile 229595 2012-01-05 12:52:05Z mm $
@


1.108.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.108.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/lib/libarchive/Makefile 224152 2011-07-17 21:27:38Z mm $
@


1.107
log
@SVN rev 221472 on 2011-05-05 01:16:06Z by 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)]

Update the hash function support comments, and update config_freebsd.h
to match.

Approved by:	kientzle
@
text
@d16 3
d62 1
d73 1
@


1.106
log
@SVN rev 208184 on 2010-05-17 07:06:54Z by delphij

Fix build.
@
text
@d5 2
a6 2
DPADD=	${LIBZ} ${LIBMD}
LDADD=	-lz -lmd
d27 3
@


1.105
log
@SVN rev 208169 on 2010-05-16 20:43:17Z by kientzle

Reorganize slightly in preparation for making lzma and bz2 support conditional.
@
text
@d10 1
a10 1
CFLAGS+= -DHAVE_BZLIB_H 1
@


1.104
log
@SVN rev 207849 on 2010-05-10 15:28:44Z by mm

Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
@
text
@d5 10
a14 2
DPADD=	${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBLZMA}
LDADD=	-lbz2 -lz -lmd -llzma
a21 1
CFLAGS+=	-DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
@


1.103
log
@SVN rev 201381 on 2010-01-02 09:58:07Z by ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
@
text
@d5 2
a6 2
DPADD=	${LIBBZ2} ${LIBZ} ${LIBMD}
LDADD=	-lbz2 -lz -lmd
d14 1
a14 4
#Uncomment to build with full lzma/xz support via liblzma
#liblzma is not (yet?) part of the FreeBSD base system
#CFLAGS+= -I/usr/local/include -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
#LDADD+= -L/usr/local/lib -llzma
@


1.102
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
@a24 2
WARNS?=	6

@


1.101
log
@SVN rev 201168 on 2009-12-29 06:15:32Z by 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.
@
text
@d54 1
@


1.100
log
@SVN rev 201098 on 2009-12-28 02:58:14Z by kientzle

New archive_file_count() utility.
@
text
@d90 1
@


1.99
log
@SVN rev 201096 on 2009-12-28 02:41:27Z by kientzle

Various portability fixes, plus:
 * New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates
@
text
@d227 1
@


1.98
log
@SVN rev 195767 on 2009-07-19 17:25:24Z by kensmith

Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
@
text
@d37 1
@


1.98.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.98.2.2
log
@SVN rev 213667 on 2010-10-10 08:41:08Z by mm

- Add liblzma support to libarchive and usr.bin/tar
- Do not link usr.bin/ar to liblzma if building bootstrap-tools and
the local system doesn't include liblzma (fixes world build on FreeBSD 7.x)

This is a direct commit.

Approved by:	delphij (mentor)
@
text
@d5 2
a6 10
DPADD=	${LIBZ} ${LIBMD}
LDADD=	-lz -lmd

DPADD+=	${LIBBZ2}
LDADD+=	-lbz2
CFLAGS+= -DHAVE_BZLIB_H=1

DPADD+=	${LIBLZMA}
LDADD+=	-llzma
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
d14 4
@


1.98.2.3
log
@SVN rev 215233 on 2010-11-13 06:07:39Z by kientzle

MFC archive_file_count() utility function.
@
text
@a229 1
MLINKS+=	archive_util.3 archive_file_count.3
@


1.98.2.4
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 2
a6 2
DPADD=	${LIBZ}
LDADD=	-lz
a15 3
DPADD+= ${LIBBSDXML}
LDADD+= -lbsdxml

a26 3
.else
DPADD+=	${LIBMD}
LDADD+=	-lmd
a40 1
	archive_entry_xattr.c				\
a56 2
	archive_read_support_compression_rpm.c		\
	archive_read_support_compression_uu.c		\
a65 1
	archive_read_support_format_xar.c		\
a92 1
	archive_write_set_format_zip.c			\
@


1.98.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
@a3 2
LIBARCHIVEDIR=	${.CURDIR}/../../contrib/libarchive

d23 1
a23 1
CFLAGS+=	-DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\"
d35 1
a35 1
.PATH: ${LIBARCHIVEDIR}/libarchive
d278 1
a278 1
.PHONY: check test clean-test
d280 1
a280 4
	cd ${.CURDIR}/test && make obj && make test

clean-test:
	cd ${.CURDIR}/test && make clean
@


1.98.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/Makefile 229596 2012-01-05 12:57:14Z mm $
@


1.98.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.98.2.5.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/lib/libarchive/Makefile 229596 2012-01-05 12:57:14Z mm $
@


1.98.2.3.2.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.98.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.98.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.97
log
@SVN rev 193101 on 2009-05-30 17:26:55Z by kientzle

Include libmd and libcrypto in DPADD
@
text
@d10 1
a10 1
SHLIB_MAJOR= 4
@


1.96
log
@SVN rev 193083 on 2009-05-30 07:08:16Z by kientzle

Link libarchive against -lmd and -lcrypto.

Thanks to Ed Schouten for the clue.
@
text
@d5 1
a5 1
DPADD=	${LIBBZ2} ${LIBZ}
d15 1
d21 2
a22 1
LDFLAGS+=	-lcrypto
a24 1

@


1.95
log
@SVN rev 191604 on 2009-04-27 22:39:43Z by kientzle

Document the liblzma support.
Unfortunately, liblzma itself is GPLed, so unlikely to become part of
the FreeBSD base system.
However, the core lzma compression/decompression code is public
domain, so it should be feasible for someone to create a compatible
library without the GPL strings.
@
text
@d6 1
a6 1
LDADD=	-lbz2 -lz
d20 1
@


1.94
log
@SVN rev 191597 on 2009-04-27 20:23:22Z by kientzle

Symlink some additional man page entries.
@
text
@d14 3
@


1.93
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
@d181 1
d193 1
d196 2
d199 1
d201 1
d203 1
@


1.92
log
@SVN rev 191241 on 2009-04-18 06:06:47Z by kientzle

Rely on OpenSSL bits only if we're building a system with OpenSSL.
Also, adjust the MD5 calls to rely on libmd instead of libcrypto,
so we keep MD5 support even in the !OpenSSL case.
@
text
@d55 1
@


1.91
log
@SVN rev 191172 on 2009-04-17 00:54:35Z by kientzle

Merge new xz/lzma support from libarchive.googlecode.com.
Since FreeBSD doesn't have liblzma in the base system, the
read side will always fall back to the unxz/unlzma commands for now.
(Which will in turn fail if those commands are not currently
installed.)  The write side does not yet have a fallback, so
that will just fail.
@
text
@d2 1
d15 5
@


1.90
log
@SVN rev 190957 on 2009-04-12 05:04:02Z by kientzle

Merge from libarchive.googlecode.com r756,r761:
Document the new archive_read_disk API.
@
text
@d42 1
d67 1
@


1.89
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
@d80 1
d190 10
@


1.88
log
@SVN rev 182517 on 2008-08-31 07:21:46Z by kientzle

New mtree writer, thanks to Joerg Sonnenberger.

Obtained from:	Joerg Sonnenberger
@
text
@d28 3
@


1.87
log
@SVN rev 182101 on 2008-08-24 05:54:28Z by kientzle

Remove the stillborn attempt to cleanup tests as well as the build dir.
@
text
@d68 1
@


1.86
log
@SVN rev 182097 on 2008-08-24 05:42:22Z by kientzle

Fail copying path/.. only if SECURE_NODOTDOT was specified.
Since we already warn for any '..' elements in that case,
the extra "lastdotdot" tracking turns out to be unnecessary.

PR:		bin/124924
@
text
@a229 4
myclean:
	rm -f ${CLEANFILES}
	cd ${.CURDIR}/test && make clean

@


1.85
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
@d230 4
@


1.84
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
@a18 7
# For now, archive.h is the same as archive.h.in.
archive.h:     archive.h.in
	cat ${.CURDIR}/archive.h.in > archive.h

# archive.h needs to be cleaned
CLEANFILES+=	archive.h

d20 1
a20 2
SRCS=	archive.h					\
	archive_check_magic.c				\
@


1.83
log
@Add MLINK for archive_write_close.

Approved by:	jkoshy(mentor), kientzle
@
text
@a6 11
# The libarchive version stamp.
# Version is three numbers:
#  Major: Bumped ONLY when API/ABI breakage happens (see SHLIB_MAJOR)
#  Minor: Bumped when significant new features are added
#  Revision: Bumped on any notable change

# The useful version number (one integer, easy to compare)
LIBARCHIVE_VERSION= 2004012
# The pretty version string
LIBARCHIVE_VERSION_STRING!= echo $$((${LIBARCHIVE_VERSION} / 1000000)).$$((${LIBARCHIVE_VERSION} / 1000 % 1000)).$$((${LIBARCHIVE_VERSION} % 1000))

d8 1
a8 1
# It has no real relation to the version number above.
d19 3
a21 9
# Build archive.h from archive.h.in by substituting version information.
# Note: FreeBSD has inttypes.h, so enable that include in archive.h.in
archive.h:	archive.h.in Makefile
	cat ${.CURDIR}/archive.h.in | sed				\
		-e 's/@@LIBARCHIVE_VERSION@@/${LIBARCHIVE_VERSION}/g'	\
		-e 's/@@LIBARCHIVE_VERSION_STRING@@/${LIBARCHIVE_VERSION_STRING}/g' \
		-e 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g'			\
		-e 's|@@ARCHIVE_H_INCLUDE_INTTYPES_H@@|#include <inttypes.h>  /* For int64_t */|g' \
		> archive.h
d103 1
d219 1
d234 2
a235 1
check:
@


1.82
log
@New public functions archive_entry_copy_link() and archive_entry_copy_link_w()
override the currently set link value, whether that's a hardlink
or a symlink.  Plus documentation update and tests.
@
text
@d217 1
@


1.81
log
@Support for writing 'compress' format, thanks to Joerg Sonnenberger.
@
text
@d124 2
@


1.80
log
@Track version # from the portable release.
@
text
@d84 1
@


1.79
log
@The mtree.5 file has been moved to src/usr.sbin/mtree.
@
text
@d14 1
a14 1
LIBARCHIVE_VERSION= 2004010
@


1.78
log
@Update libarchive to 2.4.10.  This includes a number of improvements
that I've been working on but put off committing until after the
RELENG_7 branch, including:

* New manpages: cpio.5 mtree.5
* New archive_entry_strmode()
* New archive_entry_link_resolver()
* New read support: mtree format
* Internal API change:  read format auction only runs once
* Running the auction only once allowed simplifying a lot of bid logic.
* Cpio robustness:  search for next header after a sync error
* Support device nodes on ISO9660 images
* Eliminate a lot of unnecessary copies for uncompressed archives
* Corrected handling of new GNU --sparse --posix formats
* Correctly handle a zero-byte write to a compressed archive
* Fixed memory leaks

Many of these improvements were motivated by the upcoming bsdcpio
front-end.

There have also been extensive improvements to the libarchive_test
test harness, which I'll commit separately.
@
text
@a105 1
	mtree.5						\
@


1.77
log
@Add archive_entry_copy_gname() and archive_entry_copy_uname()
functions.

Approved by: re (bmah)
MFC after: 3 days
@
text
@a11 1
VERSION= 2.2.4
d13 4
a16 7
ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//'
ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//'
ARCHIVE_API_REV!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/.*\.//'

# Can't use /usr/bin/printf to format the version stamp here, because
# that's not available during installworld.  Fortunately, awk is.
ARCHIVE_VERSION_STAMP!=	echo ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REV} | awk '{printf("%d%03d%03d",$$1,$$2,$$3)}'
a21 2
CFLAGS+=	-DPACKAGE_NAME=\"lib${LIB}\"
CFLAGS+=	-DPACKAGE_VERSION=\"${VERSION}\"
d34 2
a35 1
		-e 's/@@ARCHIVE_VERSION@@/${VERSION}/g'	 		\
a36 3
		-e 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g'	\
		-e 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g'	\
		-e 's/@@ARCHIVE_VERSION_STAMP@@/${ARCHIVE_VERSION_STAMP}/g' \
d49 2
d69 1
d103 1
d106 1
d246 1
a246 1
test:
@


1.77.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
@d12 1
d14 7
a20 4
# The useful version number (one integer, easy to compare)
LIBARCHIVE_VERSION= 2004012
# The pretty version string
LIBARCHIVE_VERSION_STRING!= echo $$((${LIBARCHIVE_VERSION} / 1000000)).$$((${LIBARCHIVE_VERSION} / 1000 % 1000)).$$((${LIBARCHIVE_VERSION} % 1000))
d26 2
d40 1
a40 2
		-e 's/@@LIBARCHIVE_VERSION@@/${LIBARCHIVE_VERSION}/g'	\
		-e 's/@@LIBARCHIVE_VERSION_STRING@@/${LIBARCHIVE_VERSION_STRING}/g' \
d42 3
a56 2
	archive_entry_strmode.c				\
	archive_entry_link_resolver.c			\
a74 1
	archive_read_support_format_mtree.c		\
a107 1
	cpio.5						\
d249 1
a249 1
check:
@


1.77.2.2
log
@MFC: New manpage links and turn on the compress write support.
@
text
@a83 1
	archive_write_set_compression_compress.c	\
a122 2
MLINKS+=	archive_entry.3 archive_entry_copy_link.3
MLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
a213 1
MLINKS+=	archive_write.3 archive_write_close.3
@


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

Big MFC of libarchive 2.5.5.
@
text
@d7 11
d19 1
a19 1
# It has no real relation to the libarchive version number.
d30 13
d44 2
a45 1
SRCS=	archive_check_magic.c				\
a119 1
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
a234 1
MLINKS+=	archive_write.3 archive_write_set_compression_compress.3
d249 1
a249 2
.PHONY: check test
check test:
@


1.77.2.4
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/lib/libarchive/Makefile 181490 2008-08-10 04:32:47Z kientzle $
@


1.77.2.3.8.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.77.2.3.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/lib/libarchive/Makefile 181490 2008-08-10 04:32:47Z kientzle $
@


1.77.2.3.6.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.77.2.3.4.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.77.2.3.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.76
log
@Correct multiple security issues in how libarchive handles corrupt
tar archives, including a potentially exploitable buffer overflow.

Approved by:	re (kensmith, security blanket)
Reviewed by:	kientzle
Security:	FreeBSD-SA-07:05.libarchive
@
text
@d124 1
d130 1
@


1.75
log
@Fix installworld:  /usr/bin/printf isn't available then,
so use awk's printf for the formatting here instead.

Pointy hat: Yours Truly
Approved by: re
@
text
@d12 1
a12 1
VERSION= 2.2.3
@


1.74
log
@New "version stamp" simplifies determining the exact version
of libarchive being used.  I've been taking advantage of this
with a recent round of updates to libarchive_test so that it
can test older and newer versions of the library.

Approved by: re (Ken Smith)
@
text
@d18 3
a20 1
ARCHIVE_VERSION_STAMP!=	printf "%d%03d%03d" ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REV}
@


1.73
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
@d16 3
d37 8
a44 7
	cat ${.CURDIR}/archive.h.in |					\
		sed 's/@@ARCHIVE_VERSION@@/${VERSION}/g' | 		\
		sed 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g' |		\
		sed 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g' |	\
		sed 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g' |	\
		sed 's|@@ARCHIVE_H_INCLUDE_INTTYPES_H@@|#include <inttypes.h>  /* For int64_t */|g' |			\
		cat > archive.h
@


1.72
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
@d90 1
@


1.71
log
@s/@@VERSION@@/@@ARCHIVE_VERSION@@/

This is a no-op as far as FreeBSD is concerned, but makes libarchive
more autoconf-friendly.

Approved by:	kientzle
@
text
@d12 1
a12 1
VERSION= 2.0.31
d49 2
d63 1
d85 1
d92 2
a93 1
	archive_write_set_format_ustar.c
d123 4
d138 1
d145 5
d156 2
d159 1
d195 1
d227 2
@


1.70
log
@Consolidate numeric limit macros in one place; include them
only on platforms that need them.  FreeBSD doesn't.
@
text
@d35 1
a35 1
		sed 's/@@VERSION@@/${VERSION}/g' | 			\
@


1.69
log
@Overhaul of 'ar' support:
  * use "AR_GNU" as the format name instead of AR_SVR4 (it's what everyone is going to call it anyway)
  * Simplify numeric parsing to unsigned (none of the numeric values should ever be negative); don't run off end of numeric fields.
  * Finish parsing the common header fields before the next I/O request (which might dump the contents)
  * Be smarter about format guessing and trimming filenames.
  * Most of the magic values are only used in one place, so just inline them.
  * Many more comments.
  * Be smarter about handling damaged entries; return something reasonable.
  * Call it a "filename table" instead of a "string table"
  * Update tests.

Enable selection of 'ar', 'arbsd', and 'argnu' formats by name
(this allows bsdtar to create ar format archives).

The 'ar' writer still needs some work; it should reject
entries that aren't regular files and should probably also
strip leading paths from filenames.
@
text
@d12 1
a12 1
VERSION= 2.0.30
@


1.68
log
@Fix the build by temporarily disabling 'ar' support until
I can clean it up.
@
text
@d62 1
@


1.67
log
@Fix the build.
N.B. 'ar' format support is broken right now, it's not
passing tests.  If I can't find the problem soon, I'll
back out the last commit.
@
text
@a61 1
	archive_read_support_format_ar.c		\
@


1.66
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
@d12 1
a12 1
VERSION= 2.0.29
@


1.65
log
@Now that libarchive is being built in more environments,
factor out the platform-specific configuration header a bit
more cleanly.
Suggested by: Joerg Sonnenberger
@
text
@d12 1
a12 1
VERSION= 2.0.28
@


1.64
log
@Enable 'ar' support; hook it up to the build and
enable it with _read_support_format_all().
@
text
@d12 1
a12 1
VERSION= 2.0.27
d23 1
@


1.63
log
@Move archive_read_data_into_buffer into archive_read.c, simplify its
implementation, and mark it as deprecated.  It will be removed entirely
in libarchive 3.0 (in FreeBSD 8.0?) but there's no reason for anyone to
use it instead of archive_read_data.

Approved by:	kientzle
@
text
@d12 1
a12 1
VERSION= 2.0.25
d61 1
d82 1
@


1.62
log
@Notice when mkdir() fails.
Don't change permissions on an existing dir unless _EXTRACT_PERM
is requested.

In particular, bsdtar -x should not edit mode of existing dirs
now; bsdtar -xp will.
@
text
@a48 1
	archive_read_data_into_buffer.c			\
@


1.61
log
@When ARCHIVE_EXTRACT_UNLINK is requested:
  * Only try to remove the existing item if we're not restoring a directory.
  * If unlink fails, try rmdir next.
This should fix the broken --unlink option in bsdtar.

Thanks again to: Kris Kennaway, for beating up bsdtar on pointyhat.
@
text
@d12 1
a12 1
VERSION= 2.0.24
@


1.60
log
@Libarchive 2.0.23:
   * The ACL formatter was mis-formatting entries which had a
     user/group ID but no name.  Make the parser tolerant of
     these, so that old archives can be correctly restored;
     fix the formatter to generate correct entries.
   * Fix overwrite detection by introducing a new "FAILED" return
     code that indicates the current entry cannot be continued
     but the archive as a whole is still sound.
   * Header cleanup:  Remove some unused headers, add some that
     are required with new Linux systems.
@
text
@d12 1
a12 1
VERSION= 2.0.23
@


1.59
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
@d12 1
a12 1
VERSION= 2.0.20
@


1.58
log
@Add support for a new archive format "empty" that reads empty files.
@
text
@d12 1
a12 1
VERSION= 1.3.1
d19 1
a19 1
SHLIB_MAJOR= 3
d70 1
d72 2
d93 1
d180 1
d209 6
d217 3
@


1.57
log
@Bump the libarchive version number, correct the shell hackery to break
the full version down into major/minor values.
@
text
@d63 1
@


1.56
log
@Write-blocking cleanup, largely thanks to Colin Percival (cperciva@@).
   * If write block size is zero, don't block at all.
     This supports the unusual requirement of applications
     that need "no-delay" writes.
   * Expose _write_finish_entry() to give such applications more
     control over write boundaries.  (Normal applications do not
     need this, as entries are completed automatically.)
   * Correct the type of write callbacks; this is a minor API
     change that does not affect the ABI.
   * Correct the error handling in _write_next_header() around
     completing the previous entry.
   * Correct the documentation for block-size markers:  Remove
     docs for the long-defunct _read_set_block_size(); document
     all of the write block size manipulators.

MFC after: 14 days
@
text
@d9 2
a10 2
#  Major: Bumped ONLY when API/ABI breakage happens.
#  Minor: Bumped when significant new features are added (see SHLIB_MAJOR)
d12 4
a15 3
VERSION= 1.2.53
ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/\..*//'
ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//'
@


1.55
log
@Unbreak libarchive on arm.  Two parts of libarchive relied on a
traditional shortcut of defining on-disk layouts using structures of
character arrays. Unfortunately, as recently discussed on cvs-all@@,
this usage is not actually sanctioned by the standards and
specifically fails on GCC/arm (unless your data structures happen to
be "naturally aligned").

The new code defines offsets/sizes for data fields and accesses
them using explicit pointer arithmetic, instead of casting to
a structure and accessing structure fields.  In particular,
the new code is now clean with WARNS=6 on arm.

MFC after: 14 days
@
text
@a163 1
MLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
d183 3
@


1.54
log
@Connect four new files to the build.
PR: bin/86742
@
text
@a23 4
# FreeBSD/arm has some limitations.
.if ${MACHINE_ARCH} == "arm"
WARNS?= 3
.else
a24 1
.endif
@


1.53
log
@Officially rename archive_{read,write}_open_file() to
archive_{read,write}_open_filename():
   * Update Makefile to build the files using the new name.
   * Update docs to document the new names, mentioning the
old ones as "deprecated synonyms."
   * The old filenames will be reconnected to the build soon;
I'll soon recyce those files for a slightly different purpose.
@
text
@d57 1
d59 1
d75 1
d77 1
d164 1
d168 1
d192 1
d196 2
a198 1
MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
@


1.52
log
@Eliminate documentation references to a non-existent function.
@
text
@d57 1
a57 1
	archive_read_open_file.c			\
d73 1
a73 1
	archive_write_open_file.c			\
d162 1
d188 1
@


1.51
log
@Computing SHLIB_MAJOR is not a good idea.  It's really a FreeBSD
system value that has no real relation to the libarchive version.
(Except, of course, that any ABI breakage will force both to be
incremented.)
@
text
@a186 1
MLINKS+=	archive_write.3 archive_write_prepare.3
@


1.50
log
@Some minor corrections:
  * Expose functions for setting the "skip file" dev/ino information
  * Expose functions for setting/querying the block size on reads
  * Correctly propagate errors out of archive_read_close/archive_write_close
  * Update manpage with information about new functions
@
text
@d16 3
a18 6
# The FreeBSD SHLIB_MAJOR is computed from the above values.
# To bump SHLIB_MAJOR, increase the MINOR number in "version" file.
SHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR}))
# The SHLIB_MAJOR computation above attempts to match the
# version number generated by libtool.  (This may change
# when the FreeBSD port of libtool gets fixed.)
@


1.49
log
@Simplify some of the wide-character handling, inspired
in part by OpenBSD's not-quite-standard-compliant
standard libraries.  (No loss of functionality,
just minor recoding to not rely on certain "standard"
facilities that weren't actually needed.)
@
text
@d38 1
d45 1
d157 1
d162 1
@


1.48
log
@POSIX.1e-style Extended Attribute support

This commit implements storing/reading POSIX.1e-style extended
attribute information in "pax" format archives.  An outline of the
storage format is in the tar.5 manpage.  The archive_read_extract()
function has code to restore those archives to disk for Linux; FreeBSD
implementation is forthcoming.

Many thanks to Jaakko Heinonen for finding flaws in earlier
proposals and doing the bulk of the coding in this work.
@
text
@d12 1
a12 1
VERSION= 1.2.51
@


1.47
log
@The idea of supporting 'tp' was a fun one, but it is
really not worth the effort to develop and maintain
support for a format that hasn't been used for 30 years. ;-/
@
text
@d12 1
a12 1
VERSION= 1.2.41
@


1.46
log
@Remove configure.ac.in and reorganize a few other things.  This is
part of a program to remove the non-FreeBSD autoconf/automake build
system for libarchive from the FreeBSD source tree.
@
text
@a67 1
	archive_read_support_format_tp.c		\
@


1.45
log
@Fix an aliasing error in the new TP support and reenable it in the build.
@
text
@a2 5
# This Makefile is for use with the FreeBSD buid system.  For
# non-FreeBSD systems, you should first "make distfile" on FreeBSD,
# then use the resulting tar.gz archive--which contains a portable
# autoconf/automake-generated build system--on the other system.

d7 8
a14 19
# Versioning <sigh>.  There are three distinct sets of version
# numbers:
#    * libarchive version
#    * libtool version (for shared libs built using configure script)
#    * FreeBSD SHLIB_MAJOR
# The following logic helps ensure that there is some consistency across
# these three:

# First, the libarchive version is in three parts:
# Bumped ONLY when API/ABI breakage happens (non-backwards-compatible change).
ARCHIVE_API_MAJOR=	1
# Bumped when significant new features are added.
# Also used to bump SHLIB_MAJOR for reasons other than API/ABI breakage.
# Note: Do NOT reset this to zero after bumping ARCHIVE_API_MAJOR!
ARCHIVE_API_MINOR=	2
# Bumped often. ;-)
ARCHIVE_API_REVISION=	37
# Full libarchive version combines the above three numbers.
VERSION= ${ARCHIVE_API_MAJOR}.${ARCHIVE_API_MINOR}.${ARCHIVE_API_REVISION}
d17 1
d19 3
a21 4

# The SHLIB_MAJOR computation above helps ensure that the libtool
# version (computed in configure.ac.in) provides the same
# shared library number as is used on FreeBSD.
d37 15
a51 2
# C sources to be compiled.  This is one part of SRCS below.
BASE_SRCS= archive_check_magic.c			\
a85 5
# Note: archive.h does need to be in SRCS, since it is built
# from archive.h.in.  But it does not get included in DIST_FILES
# below, so I build up SRCS in two steps.
SRCS=	${BASE_SRCS} archive.h

a197 56
# Build archive.h from archive.h.in by substituting version information.
archive.h:	archive.h.in Makefile
	cat ${.CURDIR}/archive.h.in |					\
		sed 's/@@VERSION@@/${VERSION}/g' | 			\
		sed 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g' |		\
		sed 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g' |	\
		sed 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g' |	\
		sed 's/@@ARCHIVE_API_REVISION@@/${ARCHIVE_API_REVISION}/g' | \
		cat > archive.h

# archive.h needs to be cleaned
CLEANFILES+=	archive.h

#
# Voodoo for building a distfile that uses autoconf/automake/etc.
#

# Files that just get copied to the distfile build directory
DIST_WORK_DIR=	${.OBJDIR}/lib${LIB}-${VERSION}
CLEANDIRS+=	${DIST_WORK_DIR}
DISTFILE=	lib${LIB}-${VERSION}.tar.gz
# DIST_FILES is the list of files to include in the distribution.
DIST_FILES=	${BASE_SRCS}
DIST_FILES+=	${MAN}
DIST_FILES+=	archive.h.in
DIST_FILES+=	archive_entry.h archive_platform.h
DIST_FILES+=	archive_private.h archive_string.h
DIST_FILES+=	Makefile.am

distfile:
	rm -rf ${DIST_WORK_DIR}
	mkdir ${DIST_WORK_DIR}
	# Copy the DIST_FILES; ignore errors, don't preserve permissions.
	for f in ${DIST_FILES}; do				\
		cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true; \
	done
	# Build configure.ac from configure.ac.in
	cat ${.CURDIR}/configure.ac.in |				\
		sed 's/@@VERSION@@/${VERSION}/g' |			\
		sed 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g' | 		\
		sed 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g' |	\
		sed 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g' |	\
		sed 's/@@ARCHIVE_API_REVISION@@/${ARCHIVE_API_REVISION}/g' | \
		cat > ${DIST_WORK_DIR}/configure.ac
	# Prepare some auxiliary files.
	(cd ${DIST_WORK_DIR} && libtoolize)
	(cd ${DIST_WORK_DIR} && aclocal && autoheader)
	# Build the configure script and portable Makefile
	(cd ${DIST_WORK_DIR} && autoconf && automake -a --foreign)
	# Now, use automake-generated Makefile to build the final dist file.
	(cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist)
	mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR}
	@@echo ==================================================
	@@echo Created ${.OBJDIR}/${DISTFILE}
	@@echo ==================================================

@


1.44
log
@Disable "tp" support until I figure out why it's breaking the build. <sigh>
@
text
@d71 1
@


1.43
log
@Add support for "tp" format.  tp was the standard system
archiver for Fourth Edition through Sixth Edition Unix; it was
replaced by tar in Seventh Edition.  (First Edition through
Third Edition used "tap.")

Unfortunately, tp was not so very standard; there were a
few different variants.  The code here attempts to support
what I believe were the most common variants.

tp support is not yet enabled by archive_read_support_format_all(),
as I'm not yet entirely comfortable with the detection
heuristics.  People interested in experimenting can
add archive_read_support_format_tp() just after any calls
to archive_read_support_format_all() in bsdtar to see how
well this works.

TODO: tp format is roughly similar in structure to dump/restore
   archive formats used by many systems.  It should be possible
   to generalize this code to handle many dump/restore variants.
   Format detection heuristics are going to be rough, though.

Thanks to: Warren Toomey, whose very basic tp extraction programs
   and documentation made this possible.
@
text
@a70 1
	archive_read_support_format_tp.c		\
@


1.42
log
@Add missing shared library interdependencies.
@
text
@d28 1
a28 1
ARCHIVE_API_REVISION=	36
d71 1
@


1.41
log
@Fix installworld breakage. <sigh>

expr and printf are not available during installworld, so
use /bin/sh arithmetic expansion instead of expr and simply
give up on vanity formatting. ;-)
@
text
@d9 2
@


1.40
log
@1) Use GNU libtool to build shared libraries on non-FreeBSD
   systems (or on FreeBSD systems when using ports).

2) Overhaul the versioning logic.  In particular,
   SHLIB_MAJOR number is now computed as "major+minor",
   which ensures library versions are the same for
   the FreeBSD build system and the portable
   libtool/autoconf/automake build system.
@
text
@d28 1
a28 1
VERSION!=printf "%d.%02d.%03d" ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REVISION}
d31 1
a31 1
SHLIB_MAJOR!= expr ${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR}
@


1.39
log
@Add a lot of error checks, based on the patches provided by Dan Lukes.
Also fixes a memory leak reported by Andrew Turner.

PR: bin/83476
Thanks to: Dan Lukes, Andrew Turner
@
text
@d3 6
a8 4
#
# Use "make distfile" to build a conventional tar.gz archive
# complete with autoconf/automake-generated build system.
#
d10 26
a36 5
LIB=	archive
VERSION=	1.02.033
ARCHIVE_API_FEATURE=	2
ARCHIVE_API_VERSION=	2
SHLIB_MAJOR=	${ARCHIVE_API_VERSION}
d41 1
d48 1
d51 2
a52 3
# Note: archive.h does need to be listed here, since it's built
SRCS=	archive.h					\
	archive_check_magic.c				\
d86 6
d100 1
d203 1
a203 1
# Build archive.h from archive.h.in
d206 5
a210 2
		sed 's/@@ARCHIVE_API_VERSION@@/${ARCHIVE_API_VERSION}/' |	\
		sed 's/@@ARCHIVE_API_FEATURE@@/${ARCHIVE_API_FEATURE}/' |	\
d224 2
a225 1
DIST_FILES=	${SRCS}
d235 3
a237 3
	for f in ${DIST_FILES};					\
	do							\
		cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true;	\
d239 7
a245 2
	cat ${.CURDIR}/configure.ac.in |			\
		sed 's/@@VERSION@@/${VERSION}/' |			\
d247 2
d250 1
d252 1
@


1.38
log
@Style issue:  Don't include <wchar.h> where it is not actually needed.
(wchar_t is defined in stddef.h, and only two files need more than that.)

Portability:  Since the wchar requirements are really quite modest,
it's easy to define basic replacements for wcslen, wcscmp, wcscpy,
etc, for use on systems that lack <wchar.h>.  In particular, this allows
libarchive to be used on older OpenBSD systems.
@
text
@d10 1
a10 1
VERSION=	1.02.032
@


1.37
log
@Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
@
text
@d10 1
a10 1
VERSION=	1.02.026
@


1.36
log
@Minor clean up for flags restoration: Use fchflags/lchflags when
available, stub out flags restore on platforms that don't support it,
update autoconf to probe for fchflags and lchflags support.
@
text
@d12 1
a12 1
ARCHIVE_API_VERSION=	1
@


1.36.2.1
log
@Insta-MFC of the shared library version bump.  All shared libraries
whose version has not already been bumped since RELENG_5 are being
bumped.

Revisions of files being MFC-ed:

> Path						Revision
> src/gnu/lib/libdialog/Makefile		1.43
> src/gnu/lib/libg2c/Makefile			1.16
> src/gnu/lib/libobjc/Makefile			1.27
> src/gnu/lib/libreadline/Makefile.inc		1.12
> src/gnu/lib/libregex/Makefile			1.32
> src/gnu/lib/libstdc++/Makefile		1.56
> src/kerberos5/lib/Makefile.inc		1.7
> src/lib/Makefile.inc				1.3
> src/lib/libalias/Makefile			1.31
> src/lib/libarchive/Makefile			1.37
> src/lib/libbegemot/Makefile			1.3
> src/lib/libbluetooth/Makefile			1.2
> src/lib/libbsnmp/Makefile.inc			1.6
> src/lib/libbz2/Makefile			1.6
> src/lib/libc_r/Makefile			1.42
> src/lib/libcrypt/Makefile			1.36
> src/lib/libdevstat/Makefile			1.15
> src/lib/libdevstat/devstat.h			1.11
> src/lib/libedit/Makefile			1.29
> src/lib/libexpat/Makefile			1.5
> src/lib/libfetch/Makefile			1.45
> src/lib/libftpio/Makefile			1.14
> src/lib/libgpib/Makefile			1.2
> src/lib/libipsec/Makefile			1.17
> src/lib/libkiconv/Makefile			1.3
> src/lib/libmagic/Makefile			1.7
> src/lib/libmp/Makefile			1.10
> src/lib/libncp/Makefile			1.6
> src/lib/libncurses/Makefile			1.79
> src/lib/libnetgraph/Makefile			1.11
> src/lib/libngatm/Makefile			1.6
> src/lib/libopie/Makefile			1.21
> src/lib/libpam/Makefile.inc			1.17
> src/lib/libpthread/Makefile			1.54
> src/lib/libradius/Makefile			1.12
> src/lib/libsdp/Makefile			1.4
> src/lib/libsmb/Makefile			1.8
> src/lib/libtacplus/Makefile			1.7
> src/lib/libthr/Makefile			1.14
> src/lib/libthread_db/Makefile			1.6
> src/lib/libugidfw/Makefile			1.7
> src/lib/libusbhid/Makefile			1.10
> src/lib/libutil/Makefile			1.57
> src/lib/libvgl/Makefile			1.11
> src/lib/libwrap/Makefile			1.17
> src/lib/libypclnt/Makefile			1.13
> src/lib/msun/Makefile				1.72
> src/secure/lib/libcrypto/Makefile		1.74
> src/secure/lib/libssh/Makefile		1.35
> src/secure/lib/libssl/Makefile		1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc	1.10

Reviewed by:	ru
Approved by:	re (scottl)
@
text
@d12 1
a12 1
ARCHIVE_API_VERSION=	2
@


1.36.2.2
log
@MFC libarchive 1.2.53 to FreeBSD 6.

  * Fixes bin/86690 (sparse file extraction)
  * Fixes bin/87911 (assertion failure after failed open)
  * Corrects handling of very old files (negative mtime)
  * Better error checking for memory allocation failures
  * Style and portability fixes
  * Documentation corrections
  * Initial extended attribute support
@
text
@d3 4
a6 3
LIB=	archive
DPADD=	${LIBBZ2} ${LIBZ}
LDADD=	-lbz2 -lz
a7 11
# The libarchive version stamp.
# Version is three numbers:
#  Major: Bumped ONLY when API/ABI breakage happens.
#  Minor: Bumped when significant new features are added (see SHLIB_MAJOR)
#  Revision: Bumped on any notable change
VERSION= 1.2.53
ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/\..*//'
ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//'

# libarchive in FreeBSD 6 uses SHLIB_MAJOR=2.
SHLIB_MAJOR= 2
d9 5
a17 1
# FreeBSD/arm has some limitations.
a23 1
# Headers to be installed in /usr/include
d26 1
a26 13
# Build archive.h from archive.h.in by substituting version information.
archive.h:	archive.h.in Makefile
	cat ${.CURDIR}/archive.h.in |					\
		sed 's/@@VERSION@@/${VERSION}/g' | 			\
		sed 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g' |		\
		sed 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g' |	\
		sed 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g' |	\
		cat > archive.h

# archive.h needs to be cleaned
CLEANFILES+=	archive.h

# Sources to be compiled.
a61 1
# Man pages to be installed.
a69 1
# Symlink the man pages under each function name.
d172 43
@


1.36.2.3
log
@MFC: synchronize libarchive with FreeBSD-CURRENT.  This includes
the following:

 * License updates.
 * Fixes for FreeBSD/arm
 * New read_open_filename, read_open_memory
 * New write_open_filename, write_open_memory
 * Write-blocking cleanup (cperciva@@)
 * Adjust API so read_open/write_open funcs only need public API
 * Portability improvements (casts, include guards, etc.)
 * Properly pad sparse archive entries with blocks of zero bytes (cperciva@@)
 * Correct copy of data to file when very large reads are possible
 * Be more flexible about dir permissions to avoid some fixups
 * Correct skip handling for entries over 2G (cperciva@@)
 * ISO9660: skip entries faster, support entries over 2G
 * Tar: correct position accounting when skipping large entries (cperciva@@)
 * Support unbuffered write as a special case (blocksize=0) (cperciva@@)
 * Documentation corrections, improvements
 * Spelling corrections (cperciva@@)
 * Improve some internal error returns

A few of these changes break the API/ABI and are therefore conditional
on the version number.  FreeBSD 6 will continue to use libarchive 1.x,
which will continue to use the old API/ABI.  When all of these changes
are ready, the libarchive version number will be changed in -CURRENT
to enable the new API.  Hopefully, this will allow the actual source
to remain identical between FreeBSD 6 and 7; only the version
parameters in the Makefile will be different.
@
text
@d9 2
a10 2
#  Major: Bumped ONLY when API/ABI breakage happens (see SHLIB_MAJOR)
#  Minor: Bumped when significant new features are added
d12 3
a14 1
VERSION= 1.3.1
a15 5
ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//'
ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//'

# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the version number above.
d23 4
d28 1
a33 1
# Note: FreeBSD has inttypes.h, so enable that include in archive.h.in
a39 1
		sed 's|@@ARCHIVE_H_INCLUDE_INTTYPES_H@@|#include <inttypes.h>  /* For int64_t */|g' |			\
a54 2
	archive_read_open_filename.c			\
	archive_read_open_memory.c			\
a70 2
	archive_write_open_filename.c			\
	archive_write_open_memory.c			\
a150 1
MLINKS+=	archive_read.3 archive_read_extract_set_skip_file.3
a154 2
MLINKS+=	archive_read.3 archive_read_open2.3
MLINKS+=	archive_read.3 archive_read_open_FILE.3
d157 1
a157 2
MLINKS+=	archive_read.3 archive_read_open_filename.3
MLINKS+=	archive_read.3 archive_read_open_memory.3
a176 3
MLINKS+=	archive_write.3 archive_write_finish_entry.3
MLINKS+=	archive_write.3 archive_write_get_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
a179 1
MLINKS+=	archive_write.3 archive_write_open_FILE.3
d182 2
a183 2
MLINKS+=	archive_write.3 archive_write_open_filename.3
MLINKS+=	archive_write.3 archive_write_open_memory.3
a184 1
MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
@


1.36.2.4
log
@MFC: "empty" format support
PR: bin/108607
@
text
@a63 1
	archive_read_support_format_empty.c		\
@


1.36.2.5
log
@MFC libarchive 1.9.

This is identical to libarchive 2.2.3 from -CURRENT, with
all of the performance improvements, bug fixes, and new
formats, except that:
  * archive_read_finish() and archive_write_finish() don't return errors
  * archive_write_data() has a different return type
  * user-provided skip callbacks have a slightly different signature

These differences maintain ABI compatibility with libarchive 1.3.1
(hence the "1" in "1.9") and allows libarchive 1.9 to have the
same SHLIB_MAJOR and otherwise serve as a straight replacement
for libarchive 1.3.1 (only better).

Thanks to:  Many, many people who contributed error reports, bug fixes,
  and suggestions over the last three years. ;-)
@
text
@d12 1
a12 1
VERSION= 1.9.0
a15 3
ARCHIVE_API_REV!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/.*\.//'

ARCHIVE_VERSION_STAMP!=	printf "%d%03d%03d" ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REV}
a23 1
CFLAGS+=	-DPLATFORM_CONFIG_H=\"config_freebsd.h\"
d34 7
a40 8
	cat ${.CURDIR}/archive.h.in | sed				\
		-e 's/@@ARCHIVE_VERSION@@/${VERSION}/g'	 		\
		-e 's/@@SHLIB_MAJOR@@/${SHLIB_MAJOR}/g'			\
		-e 's/@@ARCHIVE_API_MAJOR@@/${ARCHIVE_API_MAJOR}/g'	\
		-e 's/@@ARCHIVE_API_MINOR@@/${ARCHIVE_API_MINOR}/g'	\
		-e 's/@@ARCHIVE_VERSION_STAMP@@/${ARCHIVE_VERSION_STAMP}/g' \
		-e 's|@@ARCHIVE_H_INCLUDE_INTTYPES_H@@|#include <inttypes.h>  /* For int64_t */|g' \
		> archive.h
a48 2
	archive_entry_copy_stat.c			\
	archive_entry_stat.c				\
d50 1
a61 1
	archive_read_support_compression_program.c	\
a62 1
	archive_read_support_format_ar.c		\
a70 1
	archive_virtual.c				\
a71 2
	archive_write_disk.c				\
	archive_write_disk_set_standard_lookup.c	\
a78 1
	archive_write_set_compression_program.c		\
a79 1
	archive_write_set_format_ar.c			\
a81 1
	archive_write_set_format_cpio_newc.c		\
d84 1
a84 2
	archive_write_set_format_ustar.c		\
	filter_fork.c
a90 1
	archive_write_disk.3				\
a112 4
MLINKS+=	archive_entry.3 archive_entry_dev.3
MLINKS+=	archive_entry.3 archive_entry_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_devminor.3
MLINKS+=	archive_entry.3 archive_entry_filetype.3
a123 1
MLINKS+=	archive_entry.3 archive_entry_nlink.3
a129 5
MLINKS+=	archive_entry.3 archive_entry_set_atime.3
MLINKS+=	archive_entry.3 archive_entry_set_ctime.3
MLINKS+=	archive_entry.3 archive_entry_set_dev.3
MLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_devminor.3
a135 2
MLINKS+=	archive_entry.3 archive_entry_set_mtime.3
MLINKS+=	archive_entry.3 archive_entry_set_nlink.3
a136 1
MLINKS+=	archive_entry.3 archive_entry_set_rdev.3
a171 1
MLINKS+=	archive_read.3 archive_read_support_compression_program.3
a176 1
MLINKS+=	archive_util.3 archive_clear_error.3
a201 2
MLINKS+=	archive_write.3 archive_write_set_compression_none.3
MLINKS+=	archive_write.3 archive_write_set_compression_program.3
a204 6
MLINKS+=	archive_write_disk.3 archive_write_disk_new.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_group_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_options.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_skip_file.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_standard_lookup.3
MLINKS+=	archive_write_disk.3 archive_write_disk_set_user_lookup.3
a206 3
test:
	cd ${.CURDIR}/test && make test

@


1.36.2.6
log
@MFC unbreak installworld.  <sigh>

Pointy hat: me
@
text
@d18 1
a18 3
# Can't use /usr/bin/printf to format the version stamp here, because
# that's not available during installworld.  Fortunately, awk is.
ARCHIVE_VERSION_STAMP!=	echo ${ARCHIVE_API_MAJOR} ${ARCHIVE_API_MINOR} ${ARCHIVE_API_REV} | awk '{printf("%d%03d%03d",$$1,$$2,$$3)}'
@


1.36.2.7
log
@Correct multiple security issues in how libarchive handles corrupt
tar archives, including a potentially exploitable buffer overflow.

Reviewed by:	kientzle
Security:	FreeBSD-SA-07:05.libarchive
@
text
@d12 1
a12 1
VERSION= 1.9.1
@


1.36.2.8
log
@MFC: archive_entry_copy_gname() and archive_entry_copy_uname() functions.
@
text
@a124 1
MLINKS+=	archive_entry.3 archive_entry_copy_gname.3
a129 1
MLINKS+=	archive_entry.3 archive_entry_copy_uname.3
@


1.36.2.9
log
@MFC better error handling from archive_string_ensure()
failures.  Several key users of this function now simply
return ENOMEM to the caller instead of aborting the
program.
@
text
@d12 1
a12 1
VERSION= 1.9.2
@


1.36.2.10
log
@MFC archive_read_support_format_tar.c 1.61
This updates the support for GNU tar --posix --sparse archive
entries to be compatible with GNU tar 1.17.
@
text
@d12 1
a12 1
VERSION= 1.9.3
@


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

MFC libarchive 2.4.10, including test harness.
@
text
@d12 1
d14 7
a20 4
# The useful version number (one integer, easy to compare)
LIBARCHIVE_VERSION= 1009004
# The pretty version string
LIBARCHIVE_VERSION_STRING!= echo $$((${LIBARCHIVE_VERSION} / 1000000)).$$((${LIBARCHIVE_VERSION} / 1000 % 1000)).$$((${LIBARCHIVE_VERSION} % 1000))
d27 2
d41 1
a41 2
		-e 's/@@LIBARCHIVE_VERSION@@/${LIBARCHIVE_VERSION}/g'	\
		-e 's/@@LIBARCHIVE_VERSION_STRING@@/${LIBARCHIVE_VERSION_STRING}/g' \
d43 3
a57 2
	archive_entry_strmode.c				\
	archive_entry_link_resolver.c			\
a75 1
	archive_read_support_format_mtree.c		\
a108 1
	cpio.5						\
d250 1
a250 1
check:
@


1.36.2.12
log
@SVN rev 181553 on 2008-08-10 21:51:42Z by kientzle

MFC: comment update and version # tweak.
@
text
@d14 1
a14 1
LIBARCHIVE_VERSION= 1009005
@


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

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


1.36.2.14
log
@SVN rev 181573 on 2008-08-11 02:51:42Z by kientzle

MFC r177191: new public functions archive_entry_copy_link() and
archive_entry_copy_link_w()
@
text
@a124 2
MLINKS+=	archive_entry.3 archive_entry_copy_link.3
MLINKS+=	archive_entry.3 archive_entry_copy_link_w.3
@


1.36.2.15
log
@SVN rev 181589 on 2008-08-11 05:12:28Z by kientzle

MFC r177473: link manpage for archive_write_close
@
text
@a217 1
MLINKS+=	archive_write.3 archive_write_close.3
@


1.36.2.16
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
@d7 11
d19 1
a19 1
# It has no real relation to the libarchive version number.
d31 13
d45 2
a46 1
SRCS=	archive_check_magic.c				\
a120 1
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text.3
a235 1
MLINKS+=	archive_write.3 archive_write_set_compression_compress.3
d250 1
a250 2
.PHONY: check test
check test:
@


1.36.2.17
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/lib/libarchive/Makefile 181654 2008-08-13 03:27:33Z kientzle $
@


1.36.2.16.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.35
log
@Start to address the race issue between restoring a file's contents
and restoring the metadata.  In particular, the metadata-restore
functions now all accept a file descriptor and a pathname.  If the
file descriptor is set and the platform supports the appropriate
syscall, restore the metadata through the file descriptor.  Otherwise,
restore it through the pathname.  This is complicated by varying
syscall support (FreeBSD has an fchmod(2) but no fchflags(2), for
example) and because non-file entries don't have an fd to use in
restoring attributes (for example, mknod(2) doesn't return a file
handle).

MFC after: 14 days
@
text
@d10 1
a10 1
VERSION=	1.02.023
@


1.34
log
@Fix broken ACL configuration on FreeBSD 4 and Linux.

Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
@
text
@d10 1
a10 1
VERSION=	1.02.019
@


1.33
log
@Update "make distfile" to use newest automake/autoconf from ports.

Thanks to: Juergen Lock
@
text
@d10 1
a10 1
VERSION=	1.02.017
d207 2
a208 1
	(cd ${DIST_WORK_DIR} && aclocal19 && autoheader259 && autoconf259 && automake19 -a --foreign)
@


1.32
log
@Clean up the support for extracting very long pathnames.
@
text
@d10 1
a10 1
VERSION=	1.02.016
d207 1
a207 1
	(cd ${DIST_WORK_DIR} && aclocal && autoheader && autoconf && automake -a --foreign)
@


1.31
log
@Support extracting entries with pathnames longer than PATH_MAX.  In
testing, I've archived and restored dir trees with ~1MB pathnames.
Most formats, of course, have much smaller limits.
@
text
@d10 1
a10 1
VERSION=	1.02.013
@


1.30
log
@Fix a buffer overflow in the "none" decompression handler that
occurred with large read-ahead requests.  This only affected
formats that incorrectly make large requests (ZIP did this until
recently) or with block sizes over 32k.
@
text
@d10 1
a10 1
VERSION=	1.02.006
@


1.29
log
@Basic support for ZIP archives.
Only supports "deflate" and "none" compression for now.

Also, add a few clarifications to the archive_read.3 manpage as
requested by William Dean DeVries.
@
text
@d10 1
a10 1
VERSION=	1.02.002
@


1.28
log
@Documentation improvements.  In particular,
expand and clarify the description of the client
callback functions and how they should handle errors.

Thanks to: Antony Dovgal
@
text
@d10 1
a10 1
VERSION=	1.01.022
d45 1
d146 1
@


1.27
log
@First cut support for extracting from ISO9660 disk images.
This seems to be able to extract a TOC and extract files from
the couple of ISO images I've tested it with.

Treat this as experimental proof-of-concept code for the
moment.  There are still a bunch of debug messages (there
are a few oddities in ISO9660 that I haven't yet figured
out how to handle), a lot of bugs to be addressed (this
code leaks memory very badly), and a lot of missing features (no
Rockridge support, in particular).  I'd appreciate
feedback from anyone who understands ISO9660 format
better than I do. ;-)

Suggested by: Robert Watson
@
text
@d143 1
@


1.26
log
@Makefile tweaks:
  * Update Version
  * Add a missing MLINK
  * Fix 'distfile' target so it works from a clean checkout
@
text
@d10 1
a10 1
VERSION=	1.01.015
d43 1
@


1.25
log
@Revert 1.24:  Brain glitch.  <sigh>
@
text
@d10 1
a10 1
VERSION=	1.01.013
d149 1
d198 1
a198 1
		cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f;	\
@


1.24
log
@archive.h gets built in ${.OBJDIR}
@
text
@d168 1
a168 1
${.OBJDIR}/archive.h:	archive.h.in Makefile
@


1.23
log
@Build as a shared lib again.

Discussed with:	kientzle
@
text
@d168 1
a168 1
archive.h:	archive.h.in Makefile
@


1.22
log
@Forced commit to remind me to...
MFC after: 3 days
@
text
@a23 4
# I'm not yet ready for a shared version of this library, as
# there are a couple of API changes still in the works.
NOPIC=	1

@


1.21
log
@Per Ruslan, bsd.lib.mk already has support for dynamically-generated
.h files.  This simplifies the Makefile here a bit and makes it behave
better in a couple of situations.  While I'm here, clean up some comments
and try to improve the organization a bit.

Thanks to: Ruslan Ermilov (The Marvelous Makefile Guru)
@
text
@@


1.20
log
@Eliminate reliance on non-portable <err.h> by implementing a very
simple errx() function.
Improve behavior when bzlib/zlib are missing by detecting and
issuing an error message on attempts to read gzip/bzip2 compressed
archives.
@
text
@d30 3
a32 1
SRCS=	archive_check_magic.c				\
a170 14
#
# archive.h is built dynamically, which has a number of implications...
#

# Ensure archive.h gets built before we compute dependencies.
beforedepend: archive.h
afterdepend:
	echo "archive.h: Makefile" >> ${DEPENDFILE}
# Ensure archive.h gets built before we compile anything.
${SRCS:S/.c$/.o/}: archive.h

# archive.h needs to be cleaned
CLEANFILES+=	archive.h

d178 7
d187 1
a194 2

CLEANDIRS+=	${DIST_WORK_DIR}
@


1.20.2.1
log
@MFC: Correct the handling of the dynamically-generated .h file
Approved by: re (Ken Smith)
@
text
@d30 1
a30 3
# Note: archive.h does need to be listed here, since it's built
SRCS=	archive.h					\
	archive_check_magic.c				\
d169 14
a189 7
# archive.h needs to be cleaned
CLEANFILES+=	archive.h

#
# Voodoo for building a distfile that uses autoconf/automake/etc.
#

a191 1
CLEANDIRS+=	${DIST_WORK_DIR}
d199 2
@


1.20.2.2
log
@MFC: Synchronize libarchive with -current.

Among other fixes:
  * Corrected handling of write errors,
    use consistent error return values throughout.
  * Correct assembly/disassembly of major/minor device
    numbers so that very large minor numbers don't
    result in incorrect major numbers.
  * Allow tar format to read a non-existent file.
    (It will be treated as empty.)  This allows
    bsdtar -r/-u to work with empty files.
  * Update some comments/documentation, prune out
    some dead code, other minor changes.
@
text
@d10 1
a10 1
VERSION=	1.01.015
a152 1
MLINKS+=	archive_util.3 archive_set_error.3
d201 1
a201 1
		cat ${.CURDIR}/$$f >${DIST_WORK_DIR}/$$f || true;	\
@


1.20.2.3
log
@MFC: Sync libarchive with -CURRENT.

This brings a number of new features (iso9660 and ZIP support),
some important bug fixes and a number of documentation enhancements.

All in time for 5.4. ;-)
@
text
@d10 1
a10 1
VERSION=	1.02.006
d24 4
a46 1
	archive_read_support_format_iso9660.c		\
a47 1
	archive_read_support_format_zip.c		\
a145 1
MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
a146 1
MLINKS+=	archive_read.3 archive_read_support_format_zip.3
@


1.20.2.4
log
@MFC
   Makefile 1.32, archive_entry.c 1.25, archive_entry.h 1.13,
   archive_read_extract.c 1.38

Support extracting very long pathnames.
@
text
@d10 1
a10 1
VERSION=	1.02.016
@


1.20.2.5
log
@MFC several libarchive bugfixes:
   * "make distfile" uses correct automake/autoconf commands
   * Rewrite path shortening to avoid crash on certain paths
       between 245 and 255 characters long
   * Fix broken ACL configuration on FreeBSD 4 and Linux
   * Fix GNU tar long symlink handling
@
text
@d10 1
a10 1
VERSION=	1.02.019
d207 1
a207 2
	(cd ${DIST_WORK_DIR} && aclocal && autoheader)
	(cd ${DIST_WORK_DIR} && autoconf && automake -a --foreign)
@


1.20.2.6
log
@MFC: Update libarchive to 1.02.033.  (Synchronize with -CURRENT.)

Among other fixes:
  * C++ support
  * Portability:  remove C99 requirements
  * Portability:  don't require wchar.h
  * Check for memory allocation failures
  * Portability:  better detection of ACL support
  * Signed/unsigned fixes
  * Fix crash when archive_read_next_header called after an
    open failure
  * Fix archive_read_data
  * Reduce window for attribute restore security race
  * Clean up pathnames before creating leading dirs
  * assign default inode/dev values to extracted tar entries
    to better support tar->cpio conversions
  * Trim mode and time values for inner ustar header when constructing
    pax entries
  * Sample code in archive_read.3 and archive_write.3 works now
  * Many comment and documentation corrections
@
text
@d10 1
a10 1
VERSION=	1.02.033
d12 1
a12 1
ARCHIVE_API_VERSION=	2
@


1.20.2.7
log
@Correct the SHLIB_MAJOR back to 1 for libarchive.

In a recent MFC, I accidentally picked up a SHLIB_MAJOR
version bump for FreeBSD 6.

Anyone that updated their 5-STABLE system
between October 4, 2005 and now should delete
/usr/lib/libarchive.so.2.

Apologies.
@
text
@d12 2
a13 2
ARCHIVE_API_VERSION=	1
SHLIB_MAJOR=	1
@


1.19
log
@Split archive_{read,write}_finish into separate "close" (finish the archive
and close it) and "finish" (destroy the object) functions.   For backwards
compat and simplicity, have "finish" invoke "close" transparently if needed.
This allows clients to close the archive and check end-of-operation
statistics before destroying the object.
@
text
@d10 1
a10 1
VERSION=	1.01.010
@


1.18
log
@Fix the calculation of the most negative int64_t value, which
is used on systems that lack C99 headers (such as FreeBSD 4).
@
text
@d10 4
a13 3
SHLIB_MAJOR=	1
VERSION=	1.00.009
ARCHIVE_API_FEATURE=	1
d186 1
a186 1
		sed 's/@@ARCHIVE_API_VERSION@@/${SHLIB_MAJOR}/' |		\
@


1.17
log
@libarchive now has two complete build systems.  The usual "Makefile"
is present for FreeBSD.  If you "make distfile" on FreeBSD, you will
soon have a tar.gz file suitable for deploying to other systems
(complete with the expected "configure" script, etc).  This latter
relies (at least for now) on the GNU auto??? tools.  (I like autoconf
okay, but someday I hope to write a custom Makefile.in and dispense
with automake, which is somewhat odious.)

As part of this, I've cleaned up some of the conditional
compilation options, added make-foo to construct archive.h dynamically
(it now contains some version constants), and added some useful
informational files.
@
text
@d11 1
a11 1
VERSION=	1.00.007
d183 1
a183 1
archive.h:	archive.h.in
@


1.16
log
@For the "portable" distribution, the configure script will overwrite
"Makefile," so I'm moving all the FreeBSD build machinery to
"Makefile.freebsd", with the default "Makefile" containing a single
include.
@
text
@d2 217
a218 1
.include "Makefile.freebsd"
@


1.15
log
@When writing "pax" format, readers are supposed to ignore fields
in the regular ustar header that are overridden by the pax
extended attributes.  As a result, it makes perfect sense to
use numeric extensions in the regular ustar header so that readers
that don't understand pax extensions but do understand some other
extensions can still get useful information out of it.

This is especially important for filesizes, as the failure to
read a file size correctly can get the reader out of sync.

This commit introduces a "non-strict" option into the internal
function to format a ustar header.  In non-strict mode, the formatter
will use longer octal values (overwriting terminators) or binary
("base-256") values as needed to ensure that large file sizes,
negative mtimes, etc, have the correct values stored in the regular
ustar header.
@
text
@d2 1
a2 159

LIB=	archive
SHLIB_MAJOR=	1
VERSION=	1.00.002
CFLAGS+=	-DPACKAGE_NAME=\"lib${LIB}\"
CFLAGS+=	-DPACKAGE_VERSION=\"${VERSION}\"

.if ${MACHINE_ARCH} == "arm"
WARNS?= 3
.else
WARNS?=	6
.endif

# I'm not yet ready for a shared version of this library, as
# there are a couple of API changes still in the works.
NOPIC=	1

INCS=	archive.h archive_entry.h

SRCS=	archive_check_magic.c				\
	archive_entry.c					\
	archive_read.c					\
	archive_read_data_into_buffer.c			\
	archive_read_data_into_fd.c			\
	archive_read_extract.c				\
	archive_read_open_fd.c				\
	archive_read_open_file.c			\
	archive_read_support_compression_all.c		\
	archive_read_support_compression_bzip2.c	\
	archive_read_support_compression_compress.c	\
	archive_read_support_compression_gzip.c		\
	archive_read_support_compression_none.c		\
	archive_read_support_format_all.c		\
	archive_read_support_format_cpio.c		\
	archive_read_support_format_tar.c		\
	archive_string.c				\
	archive_string_sprintf.c			\
	archive_util.c					\
	archive_write.c					\
	archive_write_open_fd.c				\
	archive_write_open_file.c			\
	archive_write_set_compression_bzip2.c		\
	archive_write_set_compression_gzip.c		\
	archive_write_set_compression_none.c		\
	archive_write_set_format.c			\
	archive_write_set_format_by_name.c		\
	archive_write_set_format_cpio.c			\
	archive_write_set_format_pax.c			\
	archive_write_set_format_shar.c			\
	archive_write_set_format_ustar.c

MAN=	archive_entry.3					\
	archive_read.3					\
	archive_util.3					\
	archive_write.3					\
	libarchive.3					\
	libarchive-formats.5				\
	tar.5

MLINKS+=	archive_entry.3 archive_entry_acl_add_entry.3
MLINKS+=	archive_entry.3 archive_entry_acl_add_entry_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_clear.3
MLINKS+=	archive_entry.3 archive_entry_acl_count.3
MLINKS+=	archive_entry.3 archive_entry_acl_next.3
MLINKS+=	archive_entry.3 archive_entry_acl_next_w.3
MLINKS+=	archive_entry.3 archive_entry_acl_reset.3
MLINKS+=	archive_entry.3 archive_entry_acl_text_w.3
MLINKS+=	archive_entry.3 archive_entry_clear.3
MLINKS+=	archive_entry.3 archive_entry_clone.3
MLINKS+=	archive_entry.3 archive_entry_copy_fflags_text_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
MLINKS+=	archive_entry.3 archive_entry_fflags.3
MLINKS+=	archive_entry.3 archive_entry_fflags_text.3
MLINKS+=	archive_entry.3 archive_entry_free.3
MLINKS+=	archive_entry.3 archive_entry_gid.3
MLINKS+=	archive_entry.3 archive_entry_gname.3
MLINKS+=	archive_entry.3 archive_entry_gname_w.3
MLINKS+=	archive_entry.3 archive_entry_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_ino.3
MLINKS+=	archive_entry.3 archive_entry_mode.3
MLINKS+=	archive_entry.3 archive_entry_mtime.3
MLINKS+=	archive_entry.3 archive_entry_mtime_nsec.3
MLINKS+=	archive_entry.3 archive_entry_new.3
MLINKS+=	archive_entry.3 archive_entry_pathname.3
MLINKS+=	archive_entry.3 archive_entry_pathname_w.3
MLINKS+=	archive_entry.3 archive_entry_rdev.3
MLINKS+=	archive_entry.3 archive_entry_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_fflags.3
MLINKS+=	archive_entry.3 archive_entry_set_gid.3
MLINKS+=	archive_entry.3 archive_entry_set_gname.3
MLINKS+=	archive_entry.3 archive_entry_set_hardlink.3
MLINKS+=	archive_entry.3 archive_entry_set_link.3
MLINKS+=	archive_entry.3 archive_entry_set_mode.3
MLINKS+=	archive_entry.3 archive_entry_set_pathname.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_rdevminor.3
MLINKS+=	archive_entry.3 archive_entry_set_size.3
MLINKS+=	archive_entry.3 archive_entry_set_symlink.3
MLINKS+=	archive_entry.3 archive_entry_set_uid.3
MLINKS+=	archive_entry.3 archive_entry_set_uname.3
MLINKS+=	archive_entry.3 archive_entry_size.3
MLINKS+=	archive_entry.3 archive_entry_stat.3
MLINKS+=	archive_entry.3 archive_entry_symlink.3
MLINKS+=	archive_entry.3 archive_entry_uid.3
MLINKS+=	archive_entry.3 archive_entry_uname.3
MLINKS+=	archive_entry.3 archive_entry_uname_w.3
MLINKS+=	archive_read.3 archive_read_data.3
MLINKS+=	archive_read.3 archive_read_data_block.3
MLINKS+=	archive_read.3 archive_read_data_into_buffer.3
MLINKS+=	archive_read.3 archive_read_data_into_fd.3
MLINKS+=	archive_read.3 archive_read_data_skip.3
MLINKS+=	archive_read.3 archive_read_extract.3
MLINKS+=	archive_read.3 archive_read_extract_set_progress_callback.3
MLINKS+=	archive_read.3 archive_read_finish.3
MLINKS+=	archive_read.3 archive_read_new.3
MLINKS+=	archive_read.3 archive_read_next_header.3
MLINKS+=	archive_read.3 archive_read_open.3
MLINKS+=	archive_read.3 archive_read_open_fd.3
MLINKS+=	archive_read.3 archive_read_open_file.3
MLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
MLINKS+=	archive_read.3 archive_read_support_compression_all.3
MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
MLINKS+=	archive_read.3 archive_read_support_compression_gzip.3
MLINKS+=	archive_read.3 archive_read_support_compression_none.3
MLINKS+=	archive_read.3 archive_read_support_format_all.3
MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
MLINKS+=	archive_read.3 archive_read_support_format_tar.3
MLINKS+=	archive_util.3 archive_compression.3
MLINKS+=	archive_util.3 archive_compression_name.3
MLINKS+=	archive_util.3 archive_errno.3
MLINKS+=	archive_util.3 archive_error_string.3
MLINKS+=	archive_util.3 archive_format.3
MLINKS+=	archive_util.3 archive_format_name.3
MLINKS+=	archive_write.3 archive_write_data.3
MLINKS+=	archive_write.3 archive_write_finish.3
MLINKS+=	archive_write.3 archive_write_header.3
MLINKS+=	archive_write.3 archive_write_new.3
MLINKS+=	archive_write.3 archive_write_open.3
MLINKS+=	archive_write.3 archive_write_open_fd.3
MLINKS+=	archive_write.3 archive_write_open_file.3
MLINKS+=	archive_write.3 archive_write_prepare.3
MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
MLINKS+=	archive_write.3 archive_write_set_callbacks.3
MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
MLINKS+=	archive_write.3 archive_write_set_format_pax.3
MLINKS+=	archive_write.3 archive_write_set_format_shar.3
MLINKS+=	archive_write.3 archive_write_set_format_ustar.3
MLINKS+=	libarchive.3 archive.3

.include <bsd.lib.mk>
@


1.14
log
@Define the PACKAGE_NAME and PACKAGE_VERSION macros.
@
text
@d5 1
a5 1
VERSION=	1.00.000
@


1.13
log
@Add two new convenience functions to query the uid/gid from an
archive_entry.

Update the Makefile MLINKS and manpage to bring it up-to-date with
the current status of archive_entry.  At least the manpage actually
lists all of the functions now, even if it doesn't really yet explain
them all.
@
text
@d5 3
@


1.12
log
@Add MLINKS for new API functions.
@
text
@d58 8
d78 1
d82 4
a85 1
MLINKS+=	archive_entry.3 archive_entry_hardlink_w.3
d89 4
a92 2
MLINKS+=	archive_entry.3 archive_entry_set_devmajor.3
MLINKS+=	archive_entry.3 archive_entry_set_devminor.3
d99 3
d108 1
a108 1
MLINKS+=	archive_entry.3 archive_entry_symlink_w.3
@


1.11
log
@Connect libarchive decompress support to the build.
Also, add it to archive_read_support_compression_all()
so that typical clients get it pulled in by default.
@
text
@d7 1
a7 1
WARNS?= 3 
d95 1
d97 1
a97 1
MLINKS+=	archive_read.3 archive_read_data_into_file.3
@


1.10
log
@Use WARNS?=3 for these in the arm case for now, due to toolchain issues.
@
text
@d28 1
d109 1
a113 1
MLINKS+=	archive_read.3 archive_read_support_format_gnutar.3
d135 1
@


1.9
log
@Add MLINK for newly-added archive_read_extract_set_progress_callback(3).
@
text
@d6 3
d10 1
@


1.8
log
@Add the libarchive-formats.5 manpage.  This summarizes the various
archive formats supported by libarchive, with some information about
the relative strengths and weaknesses of each format and notes about
issues with libarchive's support for those formats.

This page should make it unnecessary to list all of the libarchive
formats in the manpage of each program that uses libarchive.
Such programs can simply refer to libarchive-formats(5).
@
text
@d94 1
@


1.7
log
@Update file flag handling.

The new fflags support in archive_entry supports Linux and FreeBSD
file flags and is a bit more gracious about unrecognized flag names
than strtofflags(3).  This involves some minor API breakage.

The default tar format ("restricted pax") now enables pax extensions
when archiving files that have flags.  In particular, copying dir
heirarchies with 'bsdtar cf - -C src . | bsdtar xpf - -C dest' now
preserves file flags.  (Note the "p" on extract!)

While I'm here, fill in some additional explanation in the
archive_entry.3 manpage, fill in some missing MLINKS, mark some
overlooked internal functions 'static', and make a few minor style
fixes.
@
text
@d50 1
@


1.6
log
@More work on ACLs: fix error in archive_entry's ACL parsing code,
  try to set ACLs even if fflag restore fails, first cut at reading
  Solaris tar ACLs

Code improvement: merge gnu tar read support into main tar reader;
  this eliminates a lot of duplicate code and generalizes the tar
  reader to handle formats with GNU-like extensions.

Style: Makefile cleanup, eliminate 'dmalloc' references, remove 'tartype'
  from archive_entry (this makes archive_entry more format-agnostic)

Thanks to: David Magda for providing Solaris tar test files
@
text
@d54 4
d59 4
a62 1
MLINKS+=	archive_entry.3 archive_entry_dup.3
d65 1
d67 1
d70 1
d85 1
d87 1
@


1.5
log
@Overhauled ACL support.  This makes us compatible
with 'star' ACL handling, though there's still a
bit more work needed in this area.

Added 'write_open_fd' and 'read_open_fd' to simplify, e.g.,
tar's u and r modes.  Eliminated old 'write_open_file_position'
as a bad idea.  (It required closing/reopening files to
do updates, which led to unpleasant implications.)

Various other minor fixes, API tweaks, etc.
@
text
@a0 2
# Makefile for libarchive.
#
d2 1
a2 1
DEBUG_FLAGS=-g
d6 2
d12 2
a27 1
	archive_read_support_format_gnutar.c		\
d45 1
a45 1
MAN =   archive_entry.3					\
d52 66
a117 78
MLINKS += archive_entry.3 archive_entry_clear.3
MLINKS += archive_entry.3 archive_entry_clone.3
MLINKS += archive_entry.3 archive_entry_copy_stat.3
MLINKS += archive_entry.3 archive_entry_dup.3
MLINKS += archive_entry.3 archive_entry_free.3
MLINKS += archive_entry.3 archive_entry_gname.3
MLINKS += archive_entry.3 archive_entry_hardlink.3
MLINKS += archive_entry.3 archive_entry_new.3
MLINKS += archive_entry.3 archive_entry_pathname.3
MLINKS += archive_entry.3 archive_entry_set_devmajor.3
MLINKS += archive_entry.3 archive_entry_set_devminor.3
MLINKS += archive_entry.3 archive_entry_set_gid.3
MLINKS += archive_entry.3 archive_entry_set_gname.3
MLINKS += archive_entry.3 archive_entry_set_hardlink.3
MLINKS += archive_entry.3 archive_entry_set_mode.3
MLINKS += archive_entry.3 archive_entry_set_pathname.3
MLINKS += archive_entry.3 archive_entry_set_symlink.3
MLINKS += archive_entry.3 archive_entry_set_tartype.3
MLINKS += archive_entry.3 archive_entry_set_uid.3
MLINKS += archive_entry.3 archive_entry_set_uname.3
MLINKS += archive_entry.3 archive_entry_size.3
MLINKS += archive_entry.3 archive_entry_stat.3
MLINKS += archive_entry.3 archive_entry_symlink.3
MLINKS += archive_entry.3 archive_entry_tartype.3
MLINKS += archive_entry.3 archive_entry_uname.3
MLINKS += archive_read.3 archive_read_data.3
MLINKS += archive_read.3 archive_read_data_into_buffer.3
MLINKS += archive_read.3 archive_read_data_into_file.3
MLINKS += archive_read.3 archive_read_data_skip.3
MLINKS += archive_read.3 archive_read_extract.3
MLINKS += archive_read.3 archive_read_finish.3
MLINKS += archive_read.3 archive_read_new.3
MLINKS += archive_read.3 archive_read_next_header.3
MLINKS += archive_read.3 archive_read_open.3
MLINKS += archive_read.3 archive_read_open_fd.3
MLINKS += archive_read.3 archive_read_open_file.3
MLINKS += archive_read.3 archive_read_set_bytes_per_block.3
MLINKS += archive_read.3 archive_read_support_compression_all.3
MLINKS += archive_read.3 archive_read_support_compression_bzip2.3
MLINKS += archive_read.3 archive_read_support_compression_gzip.3
MLINKS += archive_read.3 archive_read_support_compression_none.3
MLINKS += archive_read.3 archive_read_support_format_all.3
MLINKS += archive_read.3 archive_read_support_format_cpio.3
MLINKS += archive_read.3 archive_read_support_format_gnutar.3
MLINKS += archive_read.3 archive_read_support_format_tar.3
MLINKS += archive_util.3 archive_compression.3
MLINKS += archive_util.3 archive_compression_name.3
MLINKS += archive_util.3 archive_errno.3
MLINKS += archive_util.3 archive_error_string.3
MLINKS += archive_util.3 archive_format.3
MLINKS += archive_util.3 archive_format_name.3
MLINKS += archive_write.3 archive_write_data.3
MLINKS += archive_write.3 archive_write_finish.3
MLINKS += archive_write.3 archive_write_header.3
MLINKS += archive_write.3 archive_write_new.3
MLINKS += archive_write.3 archive_write_open.3
MLINKS += archive_write.3 archive_write_open_fd.3
MLINKS += archive_write.3 archive_write_open_file.3
MLINKS += archive_write.3 archive_write_prepare.3
MLINKS += archive_write.3 archive_write_set_bytes_per_block.3
MLINKS += archive_write.3 archive_write_set_bytes_in_last_block.3
MLINKS += archive_write.3 archive_write_set_callbacks.3
MLINKS += archive_write.3 archive_write_set_compression_bzip2.3
MLINKS += archive_write.3 archive_write_set_compression_gzip.3
MLINKS += archive_write.3 archive_write_set_format_pax.3
MLINKS += archive_write.3 archive_write_set_format_ustar.3
MLINKS += libarchive.3 archive.3

INCS =	archive.h archive_entry.h

.if defined(DMALLOC)
DEBUG_FLAGS+= -DDEBUG -g
CFLAGS+= -DHAVE_DMALLOC -I/usr/local/include
LDFLAGS+= -L/usr/local/lib -ldmalloc
.endif
#CFLAGS+= -O3

WARNS?=	6
@


1.4
log
@Many fixes:

* Disabled shared-library building, as some API breakage is
  still likely.  (I didn't realize it was turned on by default.)  If
  you have an existing /usr/lib/libarchive.so.2, I recommend deleting it.
* Pax interchange format now correctly stores and reads UTF8
  for extended attributes.  In particular, pax format can portably
  handle arbitrarily long pathnames containing arbitrary characters.
* Library compiles cleanly at -O2, -O3, and WARNS=6 on all
  FreeBSD-CURRENT platforms.
* Minor portability improvements inspired by Juergen Lock
  and Greg Lewis.  (Less reliance on stdint.h, isolating of
  various portability-challenged constructs.)
* archive_entry transparently converts multi-byte <-> wide character
  strings, allowing clients and format handlers to deal with either
  one, as appropriate.
* Support for reading 'L' and 'K' entries in standard tar archives
  for star compatibility.
* Recognize (but don't yet handle) ACL entries from Solaris tar.
* Pushed format-specific data for format readers down into
  format-specific storage and out of library-global storage.  This
  should make it easier to maintain individual formats without mucking
  with the core library management.
* Documentation updates to track the above changes.
* Updates to tar.5 to correct a few mistakes and add some additional
  information about GNU tar and Solaris tar formats.

Notes:
* The basic 'tar' reader is getting more general; there's not much
  point in keeping the 'gnutar' reader separate.  Merging the two
  would lose a bunch of duplicate code.
* The libc ACL support is looking increasingly inadequate for my needs
  here.  I might need to assemble some fairly significant code for
  parsing and building ACLs. <sigh>
@
text
@d4 1
a4 1

d9 2
a10 2
# there are still a couple of API changes still in the works.
NOSHLIBS=	1
d18 1
d32 1
d85 1
a86 1
MLINKS += archive_read.3 archive_read_open_tar.3
d107 1
d126 1
a126 1
CFLAGS+= -O3
@


1.3
log
@Many fixes.

Portability: Thanks to Juergen Lock, libarchive now compiles cleanly
on Linux.  Along the way, I cleaned up a lot of error return codes and
reorganized some code to simplify conditional compilation of certain
sections.

Bug fixes:
  * pax format now actually stores filenames that are 101-154
    characters long.
  * pax format now allows newline characters in extended attributes
    (this fixes a long-standing bug in ACL handling)
  * mtime/atime are now restored for directories
  * directory list is now sorted prior to fix-up to permit
    correct restore of non-writable dir heirarchies
@
text
@d4 1
a4 1
#
d6 6
d123 1
d125 1
a125 2
# Should be WARNS=6, except that zlib.h is borked. <sigh>
WARNS?=	3
@


1.2
log
@libarchive itself is now completely clean at WARNS=10 on all architectures.

Unfortunately, the stock zlib.h is not:
  line 885: 'err' parameter shadows global 'err' definition from <err.h>

Back the WARNS level down to 3 to accomodate borked zlib.h.
@
text
@a111 1
CFLAGS+=-DDEBUG -g
d113 3
a115 2
CFLAGS+=-DDMALLOC -I/usr/local/include
LDFLAGS+=-L/usr/local/lib -ldmalloc
d118 2
a119 2
# Should be WARNS=10, except that zlib.h is borked. <sigh>
WARNS?=	3	
@


1.1
log
@Initial import of libarchive.

What it is:
   A library for reading and writing various streaming archive
   formats, especially tar and cpio.  Being a library, it should
   be easy to incorporate into pkg_* tools, sysinstall, and any
   other place that needs to read or write such archives.

Features:
  * Full automatic detection of both compression and archive format.
  * Extensible internal architecture to make it easy to add new formats.
  * Support for "pax interchange format," a new POSIX-standard tar format
    that eliminates essentially all of the restrictions of historic formats.
  * BSD license

Thanks to: jkh for pushing me to start this work, gordon for
  encouraging me to commit it, bde for answering endless style
  questions, and many others for feedback and encouragement.

Status: Pretty good overall, though there are still a few rough edges and
  the library could always use more testing.  Feedback eagerly solicited.
@
text
@d117 3
a119 1
WARNS?=	10
@

