2008-05-26 17:15:35 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2008-06-16 07:24:05 +00:00
|
|
|
|
2015-12-01 22:20:04 +00:00
|
|
|
_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
|
|
|
|
_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive
|
2011-12-22 08:42:07 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
PROG= bsdcpio
|
MFV r302003,r302037,r302038,r302056:
Update libarchive to 3.2.1 (bugfix and security fix release)
List of vendor fixes:
- fix exploitable heap overflow vulnerability in Rar decompression
(vendor issue 719, CVE-2016-4302, TALOS-2016-0154)
- fix exploitable stack based buffer overflow vulnebarility in mtree
parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153)
- fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo
(vendor issue 718, CVE-2016-4300, TALOS-2016-152)
- fix integer overflow when computing location of volume descriptor
(vendor issue 717)
- fix buffer overflow when reading a crafred rar archive (vendor issue 521)
- fix possible buffer overflow when reading ISO9660 archives on machines
where sizeof(int) < sizeof(size_t) (vendor issue 711)
- tar and cpio should fail if an input file named on the command line is
missing (vendor issue 708)
- fix incorrect writing of gnutar filenames that are exactly 512 bytes
long (vendor issue 682)
- allow tests to be run from paths that are equal or longer than 128
characters (vendor issue 657)
- add memory allocation errors in archive_entry_xattr.c (vendor PR 603)
- remove dead code in archive_entry_xattr_add_entry() (vendor PR 716)
- fix broken decryption of ZIP files (vendor issue 553)
- manpage style, typo and description fixes
Post-3.2.1 vendor fixes:
- fix typo in cpio version reporting (Vendor PR 725, 726)
- fix argument range of ctype functions in libarchive_fe/passphrase.c
- fix ctype use and avoid empty loop bodies in WARC reader
MFC after: 1 week
Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302
Approved by: re (kib)
2016-06-22 07:49:59 +00:00
|
|
|
BSDCPIO_VERSION_STRING= 3.2.1
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2015-12-01 22:20:04 +00:00
|
|
|
.PATH: ${_LIBARCHIVEDIR}/cpio
|
2011-07-17 21:42:22 +00:00
|
|
|
SRCS= cpio.c cmdline.c
|
|
|
|
|
2015-12-01 22:20:04 +00:00
|
|
|
.PATH: ${_LIBARCHIVEDIR}/libarchive_fe
|
2016-05-12 10:16:16 +00:00
|
|
|
SRCS+= err.c line_reader.c passphrase.c
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\"
|
2015-12-01 22:20:04 +00:00
|
|
|
CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\"
|
|
|
|
CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe
|
2011-07-17 21:42:22 +00:00
|
|
|
|
2009-04-19 06:59:12 +00:00
|
|
|
.ifdef RELEASE_CRUNCH
|
|
|
|
# FreeBSD's installer uses cpio in crunched binaries that are
|
|
|
|
# statically linked, cannot use -lcrypto, and are size sensitive.
|
|
|
|
CFLAGS+= -DSMALLER
|
|
|
|
.endif
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD= archive
|
2008-05-26 17:17:43 +00:00
|
|
|
|
2012-02-25 10:58:02 +00:00
|
|
|
.if ${MK_ICONV} != "no"
|
|
|
|
CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
|
|
|
|
.endif
|
|
|
|
|
2008-05-26 17:15:35 +00:00
|
|
|
SYMLINKS=bsdcpio ${BINDIR}/cpio
|
|
|
|
MLINKS= bsdcpio.1 cpio.1
|
|
|
|
|
2015-10-07 06:08:55 +00:00
|
|
|
.if ${MK_TESTS} != "no"
|
|
|
|
SUBDIR+= tests
|
|
|
|
.endif
|
2008-05-26 17:15:35 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|