Hi @ports, I found this port because the HOMEPAGE is unreachable. The diff fix MASTER_SITES and update to last stable release.
Okay? Comments? Kind regards, Rafael Index: Makefile =================================================================== RCS file: /cvs/ports/archivers/libtar/Makefile,v retrieving revision 1.13 diff -u -p -u -p -r1.13 Makefile --- Makefile 24 Nov 2015 09:11:02 -0000 1.13 +++ Makefile 25 Sep 2016 20:08:24 -0000 @@ -2,25 +2,39 @@ COMMENT= C library for manipulating tar files -DISTNAME= libtar-1.2.11 -REVISION= 2 +VERSION= 1.2.20 +DISTNAME= libtar-${VERSION} -SHARED_LIBS= tar 0.0 # .1.2 +SHARED_LIBS= tar 0.1 # .1.3 CATEGORIES= archivers devel -HOMEPAGE= http://www.feep.net/libtar/ - # BSD-like PERMIT_PACKAGE_CDROM= Yes WANTLIB= c z -MASTER_SITES= https://distfiles.nl/ \ - ftp://ftp.feep.net/pub/software/libtar/ +DISTFILES= libtar-{libtar/archive/}v${VERSION}${EXTRACT_SUFX} +MASTER_SITES= https://github.com/tklauser/ + +BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} \ + ${MODGNU_AUTOMAKE_DEPENDS} + +USE_GMAKE= Yes +CONFIGURE_STYLE= gnu + +MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS}" + +CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +AUTOCONF_VERSION= 2.69 +AUTOMAKE_VERSION= 1.11 -NO_TEST= Yes +NO_TEST= Yes -CONFIGURE_STYLE=gnu +pre-configure: + cd ${WRKSRC} && ${SETENV} AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \ + AUTOCONF_VERSION=${AUTOCONF_VERSION} autoreconf --force --install .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/archivers/libtar/distinfo,v retrieving revision 1.2 diff -u -p -u -p -r1.2 distinfo --- distinfo 4 Apr 2013 16:03:55 -0000 1.2 +++ distinfo 25 Sep 2016 20:08:24 -0000 @@ -1,2 +1,2 @@ -SHA256 (libtar-1.2.11.tar.gz) = Si7vtrcIj0HeVzVuUFnL8fkXUJtKgQ98YUYlo3joe7g= -SIZE (libtar-1.2.11.tar.gz) = 145354 +SHA256 (libtar-v1.2.20.tar.gz) = MVL8Yc8DyC77+ZZFWW79rbopfqw+haUq4YmQKgcsmhY= +SIZE (libtar-v1.2.20.tar.gz) = 63544 Index: patches/patch-lib_Makefile_in =================================================================== RCS file: patches/patch-lib_Makefile_in diff -N patches/patch-lib_Makefile_in --- patches/patch-lib_Makefile_in 10 Oct 2013 07:02:56 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,35 +0,0 @@ -$OpenBSD: patch-lib_Makefile_in,v 1.3 2013/10/10 07:02:56 jasper Exp $ - -Enable shared library, from pkgsrc. - ---- lib/Makefile.in.orig Sun Dec 15 19:02:30 2002 -+++ lib/Makefile.in Thu Oct 10 08:59:32 2013 -@@ -69,13 +69,15 @@ all: ${ALL} - .PHONY: clean distclean install - - libtar.a: ${LIBTAR_OBJS} ${LIBOBJS} -- ${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS} -- ${RANLIB} libtar.a -+ ${LIBTOOL} --mode=link --tag=CC \ -+ ${CC} -o libtar.la ${LIBTAR_OBJS:.o=.lo} ${LIBOBJS:.o=.lo} \ -+ ${LDFLAGS} -rpath ${TRUEPREFIX}/lib -version-info 1:2 - - ${LIBTAR_OBJS}: ${LIBTAR_HDRS} - - .c.o: -- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< -+ ${LIBTOOL} --mode=compile --tag=CC \ -+ ${CC} ${CFLAGS} ${CPPFLAGS} -c -o ${@:.o=.lo} $< -prefer-pic - - clean: - rm -f *~ *.o ${ALL} core -@@ -85,7 +87,8 @@ distclean: clean - - install: ${ALL} - ${MKDIR} ${DESTDIR}${libdir} -- ${INSTALL_DATA} libtar.a ${DESTDIR}${libdir} -+ ${LIBTOOL} --mode=install \ -+ ${INSTALL_DATA} libtar.la ${DESTDIR}${libdir} - ${MKDIR} ${DESTDIR}${includedir} - ${INSTALL_DATA} ${srcdir}/libtar.h ${DESTDIR}${includedir} - ${INSTALL_DATA} ../listhash/libtar_listhash.h ${DESTDIR}${includedir} Index: patches/patch-lib_block_c =================================================================== RCS file: patches/patch-lib_block_c diff -N patches/patch-lib_block_c --- patches/patch-lib_block_c 10 Oct 2013 07:16:28 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,85 +0,0 @@ -$OpenBSD: patch-lib_block_c,v 1.1 2013/10/10 07:16:28 jasper Exp $ - -Security fix for CVE-2013-4397 Integer overflow in libtar - -Patch from http://repo.or.cz/w/libtar.git/commit/45448e8bae671c2f7e80b860ae0fc0cedf2bdc04 - ---- lib/block.c.orig Tue Jan 7 02:40:59 2003 -+++ lib/block.c Thu Oct 10 08:59:51 2013 -@@ -90,8 +90,8 @@ th_read_internal(TAR *t) - int - th_read(TAR *t) - { -- int i, j; -- size_t sz; -+ int i; -+ size_t sz, j, blocks; - char *ptr; - - #ifdef DEBUG -@@ -118,21 +118,26 @@ th_read(TAR *t) - if (TH_ISLONGLINK(t)) - { - sz = th_get_size(t); -- j = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); -+ blocks = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); -+ if (blocks > ((size_t)-1 / T_BLOCKSIZE)) -+ { -+ errno = E2BIG; -+ return -1; -+ } - #ifdef DEBUG - printf(" th_read(): GNU long linkname detected " -- "(%ld bytes, %d blocks)\n", sz, j); -+ "(%ld bytes, %d blocks)\n", sz, blocks); - #endif -- t->th_buf.gnu_longlink = (char *)malloc(j * T_BLOCKSIZE); -+ t->th_buf.gnu_longlink = (char *)malloc(blocks * T_BLOCKSIZE); - if (t->th_buf.gnu_longlink == NULL) - return -1; - -- for (ptr = t->th_buf.gnu_longlink; j > 0; -- j--, ptr += T_BLOCKSIZE) -+ for (j = 0, ptr = t->th_buf.gnu_longlink; j < blocks; -+ j++, ptr += T_BLOCKSIZE) - { - #ifdef DEBUG - printf(" th_read(): reading long linkname " -- "(%d blocks left, ptr == %ld)\n", j, ptr); -+ "(%d blocks left, ptr == %ld)\n", blocks-j, ptr); - #endif - i = tar_block_read(t, ptr); - if (i != T_BLOCKSIZE) -@@ -163,21 +168,26 @@ th_read(TAR *t) - if (TH_ISLONGNAME(t)) - { - sz = th_get_size(t); -- j = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); -+ blocks = (sz / T_BLOCKSIZE) + (sz % T_BLOCKSIZE ? 1 : 0); -+ if (blocks > ((size_t)-1 / T_BLOCKSIZE)) -+ { -+ errno = E2BIG; -+ return -1; -+ } - #ifdef DEBUG - printf(" th_read(): GNU long filename detected " -- "(%ld bytes, %d blocks)\n", sz, j); -+ "(%ld bytes, %d blocks)\n", sz, blocks); - #endif -- t->th_buf.gnu_longname = (char *)malloc(j * T_BLOCKSIZE); -+ t->th_buf.gnu_longname = (char *)malloc(blocks * T_BLOCKSIZE); - if (t->th_buf.gnu_longname == NULL) - return -1; - -- for (ptr = t->th_buf.gnu_longname; j > 0; -- j--, ptr += T_BLOCKSIZE) -+ for (j = 0, ptr = t->th_buf.gnu_longname; j < blocks; -+ j++, ptr += T_BLOCKSIZE) - { - #ifdef DEBUG - printf(" th_read(): reading long filename " -- "(%d blocks left, ptr == %ld)\n", j, ptr); -+ "(%d blocks left, ptr == %ld)\n", blocks-j, ptr); - #endif - i = tar_block_read(t, ptr); - if (i != T_BLOCKSIZE) Index: patches/patch-libtar_Makefile_in =================================================================== RCS file: patches/patch-libtar_Makefile_in diff -N patches/patch-libtar_Makefile_in --- patches/patch-libtar_Makefile_in 16 Apr 2010 13:10:47 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,40 +0,0 @@ -$OpenBSD: patch-libtar_Makefile_in,v 1.1.1.1 2010/04/16 13:10:47 ajacoutot Exp $ - -Enable shared library, from pkgsrc. - ---- libtar/Makefile.in.orig Sun Dec 15 19:02:30 2002 -+++ libtar/Makefile.in Thu Apr 15 17:58:09 2010 -@@ -45,7 +45,7 @@ LIBTAR_HDRS = ../config.h \ - ${top_srcdir}/compat/compat.h \ - ${top_srcdir}/lib/libtar.h \ - ../listhash/libtar_listhash.h --LIBTAR_LIBS = ../lib/libtar.a -+LIBTAR_LIBS = ../lib/libtar.la - ALL = libtar - - -@@ -54,12 +54,15 @@ all: ${ALL} - .PHONY: clean distclean install - - libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS} -- ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS} -+ ${LIBTOOL} --mode=link --tag=CC \ -+ ${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.lo \ -+ ${LIBTAR_LIBS} ${LIBS} - - ${LIBTAR_OBJS}: ${LIBTAR_HDRS} - - .c.o: -- ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $< -+ ${LIBTOOL} --mode=compile \ -+ ${CC} ${CFLAGS} ${CPPFLAGS} -c -o ${@:.o=.lo} $< -prefer-pic - - clean: - rm -f *~ *.o ${ALL} core -@@ -69,5 +72,5 @@ distclean: clean - - install: ${ALL} - ${MKDIR} ${DESTDIR}${bindir} -- ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir} -+ ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir} -